Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created September 16, 2011 20:54
Show Gist options
  • Save thinkerbot/1223130 to your computer and use it in GitHub Desktop.
Save thinkerbot/1223130 to your computer and use it in GitHub Desktop.
PL/SQL example
-- 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