Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Into variable...what is return value
Message
General information
Forum:
Oracle
Category:
PL/SQL
Miscellaneous
Thread ID:
00408972
Message ID:
00409122
Views:
25
The answer is one of three conditions...

a) It is a NULL value....If there is a matching row and the value is empty
or
b) You get an exception NO_DATA_FOUND returned... If there is no matching rows...
or
c)you get an excepotion TOO_MANY_ROWS in this case more than 1 row match the where clause..


However, if no rows are returned, PL/SQL raises


CREATE OR REPLACE PROCEDURE FOO
AS
BEGIN
SELECT Password INTO TablePword
FROM UserControl
WHERE UserID = LoginID;
EXCEPTIONS
WHEN TOO_MANY_ROWS THEN
/*do something or null to alow prgram to exit normally*/
NULL;

WHEN NO_DATA_FOUND THEN
/*no match: do something or null to allow prgram to exit normally*/
NULL;

END FOO;

The sql syntax my not be exactly correct!?!?

Hope that helps....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform