I'm new to stored procedures in MySQL
I wonder if for example I have a query then I divide it into variables like
SELECT A, B, C, FROM TABLE123 WHERE A = '123'
Then I divide it into variables inside the stored procedure
SET @select = 'SELECT';
SET @column1= 'A';
SET @column2 = 'B';
SET @column3 = 'C';
SET @parameter = 'WHERE';
SET @equal = '=';
Then from there I can use each part or the query or variable in a conditional statement depending on the parameter set when calling the stored procedure.
I wonder if this is allowed as standard practice or will it cause any performance issue.