3
I have a mysql store as follows:
CREATE PROCEDURE nome_procedure(campo VARCHAR(15))
BEGIN
SELECT id as id, campo as value
FROM tabela
etc etc etc...;
END $$
However, since the parameter I am passing is of type VARCHAR, it returns the name of the field I pass in the result. I mean, it’s like I’ve done select like this:
SELECT id as id, 'nome_campo' as value
But what I’d like is:
SELECT id as id, nome_campo_que_eu_passei as value
How to make this return be correct?
Thanks, Augusto! Solved!!! :-)
– Marcony Felipe