1CREATE FUNCTION function_name … RETURN BOOLEAN IS
2 Definitions;
3BEGIN
4 Statement;
5 RETURN "Hello World!";
6END;
1CREATE OR REPLACE FUNCTION my_schema.my_function(param1 IN number) RETURN output1 IS
2 cnumber NUMBER;
3BEGIN
4 cnumber := 2;
5 RETURN (cnumber * param1);
6EXCEPTION
7 WHEN OTHERS THEN
8 raise_application_error(-20001, 'An error was encountered - '
9 || sqlcode || ' -ERROR- ' || sqlerrm);
10END;