0

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?

Mikeb
  • 781
  • 7
  • 24
  • Similar question posted here: http://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure – Girish Rao Jun 11 '12 at 23:10

1 Answers1

1

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.

Devart
  • 119,203
  • 23
  • 166
  • 186