Answer the question
In order to leave comments, you need to log in
How to return rows received from SELECT in a procedure?
CREATE PROCEDURE author_and_title (book_code integer)
LANGUAGE SQL
AS $$
SELECT author, title FROM books WHERE code = book_code;
$$;
CALL author_and_title(1);
Answer the question
In order to leave comments, you need to log in
Maybe you will still read the documentation for postgresql, and not for mssql? Or then stay with mssql.
https://www.postgresql.org/docs/current/xproc.html
A procedure is a database object similar to a function. The difference is that a procedure does not return a value, so there is no return type declaration.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question