Created
September 16, 2011 20:54
-
-
Save thinkerbot/1223130 to your computer and use it in GitHub Desktop.
PL/SQL example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- sqlplus -s @ pkg.sql | |
set serverout on | |
create or replace package example | |
is | |
procedure hello (thing in varchar2); | |
end example; | |
/ | |
create or replace package body example | |
is | |
procedure hello (thing in varchar2) | |
is | |
greeting varchar(8) := 'Hello '; | |
begin | |
dbms_output.put_line(greeting || thing); | |
end hello; | |
end example; | |
/ | |
show errors | |
execute example.hello('World'); | |
begin | |
example.hello('World'); | |
end; | |
/ | |
drop package example; | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment