
19-HOW TO CREATE FUNCTION
Functions are forming part of set commands' Functions can return
a value to the caller' Functions can be referred directly in the SQL queries' The value is returned through keyword within the function' Let us analyze the function syntax
create or replace function << function-name >>
( <<out-variable-name>> IN <<variable-data-type>> )
return <<data-type>>
<<variable-name>> <<data-type and length>>;
begin
' ' ' ' '
' ' ' ' '
RETURN (<<out-variable-name>>); ExCEPTION
WHEN NO-DATA-FOUND THEN
RAISE-APPLICATION-ERROR(-20100,
'some error messages');
end;
Now, we will write a complex function and learn some of the newer concepts of sql and concepts of function'
Describe what you're looking for in as much detail as you'd like.
Our AI reads your request and finds the best matching books for you.
Popular searches:
Join 2.9 million readers and get unlimited free ebooks