Mysql function to return table

Is there a way to return a table from mySQL function?

How do we do it in SQL SRV?

ALTER FUNCTION [dbo].[blablabla](
@grupo int,
@singular varchar(50), 
@plural varchar(50),
@flag_e bit,
@s_ext varchar(255)
)
RETURNS @resultado TABLE (flag_e bit, s_ext varchar(250))
AS
 BEGIN
  DECLARE

This is SQL SRV, if possible, I need similar code, but in MySQL.

Thanks in advance

EDIT

ok

[dbo].[blablabla] = returns @result TABLE

now in another function i need

...
begin
...
select * 
from dbo.blablabla(parameters)
...
end

this is the code from SQL SRV that I need to convert to MySQL

+5
source share
1 answer

No, MySQL functions can only return column data types.

However, your function can insert results into a table with the famous name & mdash, including the (temporary) created inside the body of the function; alternatively, procedures (but not functions) can generate a set of results that are sent to the client (for example, by executing an instruction SELECT).

+2
source

All Articles