sql - Basic Oracle question -
i new oracle. when create stored procedure using:
create or replace procedure procedure1 begin select firstname, lastname firstname,lastname employee; end procedure1;
i following errors:
pl/sql statement ignored identifier firstname must declared ora-00904 invalid identifier
think "as" keyword won't work. if doesn't work, use "is".
rest fine , tips.
if need regarding pl/sql, can have @ link. simple , easy understand;
http://plsql-tutorial.com/
this solution error getting;
create or replace procedure procedure1 v_firstname employee.firstname%type; v_lastname employee.lastname%type; cursor empcursor select firstname, lastname employee; begin if not empcursor%isopen open empcursor; end if; loop fetch empcursor v_firstname,v_lastname; exit when empcursor%notfound; end loop; if empcursor%isopen close empcursor; end; end procedure1;
you can use dbms_output.put_line(v_firstname || ','|| v_lastname)
, inside loop display output. in order that, first need execute command server output on
Comments
Post a Comment