New to PL/SQL, Please Give examples
Hello PL/SQL Guru's,
I am new to programming, but I wanted to write a store procedure that:
Accepts an appID as input and use it to return the card number of any card(s) in an active state associated with the appID, if any from the database.
I want this to work with our software, java.
Could you please give me some examples of how to design this?
Thanks in advance for your help!
You want something like this. Although, you should add some error handling, like what do you return when you do not get any rows, or when you get more than one row. And I do not know your table name or column names. Try readiing PL/SQL Best Practices by Steven Feuerstein.
CREATE FUNCTION get_CardNumber (
p_appid IN cardtable.appid%TYPE )
WHERE appid = p_appid;
this space intentionally left blank
Click Here to Expand Forum to Full Width