Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

David Davis rsswire.info

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

create and call an oracle function

   1  
   2  create or replace function "ORACLE_FOO"
   3  (foo_arg1 in NUMBER)
   4  return NUMBER
   5  is
   6  rt NUMBER := 0;
   7  begin
   8    IF foo_arg1 > 1 THEN
   9      SELECT 1 INTO rt;
  10    ELSE
  11      SELECT 2 INTO rt;
  12    END IF;
  13    RETURN (rt);
  14  end;
  15  
  16  SELECT ORACLE_FOO(1) FROM dual;
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS