I have a routine called sp_getalldata
and I want to select only 2 columns col1
and col2
from the resultset of the routine.
I've tried
SELECT col1, col2 FROM (CALL sp_getalldata())
but it is invalid. What are my options?
I have a routine called sp_getalldata
and I want to select only 2 columns col1
and col2
from the resultset of the routine.
I've tried
SELECT col1, col2 FROM (CALL sp_getalldata())
but it is invalid. What are my options?
You cannot use stored function as a data source in MySQL. The MySQL does not supports table functions. You only can write stored procedure with SELECT statement and call this procedure to output result-set.