Can a stored procedure/function return a table?

Viewed 81586

Can a MySql stored procedure / function return a table without the use of temp table?

Creating the following procedure

CREATE PROCEDURE database.getExamples() 
    SELECT * FROM examples;

and later calling it with

CALL database.getExamples()

displays the example table - just as expected - but the following doesn't seem to be possible:

SELECT * FROM CALL database.getExamples()

Is it possible at all to return a query result table from a stored procedure / function, and if so - how?

5 Answers
Related