Hi Mithun,
the syntax for returning result set is based on Standard SQL, but it's not an actual cursor (only those you actually process rows using fetch or FOR are sequential).
A cursor for a DYNAMIC RESULT SET is just like any SELECT answer set, it's simply returned to the client:
REPLACE PROCEDURE proc ()
DYNAMIC RESULT SETS 1
BEGIN
DECLARE c CURSOR WITH RETURN ONLY FOR
SELECT * FROM dbc.TablesV;
OPEN c;
END;
Dieter
↧