Oracle select inside an IF statement in a stored procedure -
coming sql server background, trying grasp of oracle syntax. trying return records stored procedure getting error:
create or replace procedure sp_getcustomers(username in varchar2) begin if username = 'all' select * customers c; else select * customers c c.created_by = username; end if; end;
what missing?
you missing clause, @ stage better use function return values , procedure perform action.
Comments
Post a Comment