Download TOAD. You may use this link or this link.
Download Oracle Client. You may use this link or this link.
How to install oracle client and toad ? And how to use toad is another subject.. Maybe another post..
First PL/SQL Function
Open your toad , open an editor then write down ;
CREATE OR REPLACE FUNCTION funct_user_source_count
RETURN NUMBER
IS
dummy NUMBER;
BEGIN
SELECT count(name) INTO dummy FROM user_source;
RETURN dummy;
END;
/
That's it ! Now you have your first function !
Now how to call your PL/SQL Fucntion ?
You may call your PL/SQL Function from SQL like this ;
SELECT funct_user_source_count from dualCongratulations ! You have accomplished your first step.
No comments:
Post a Comment