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....
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement