Pl-sql/no-data-found

Un article de Le wiki de 2 noisettes - noisette.ch.


Cet article est en cours de réalisation.


Requête simple

SELECT value INTO var FROM table1 WHERE pk1 = 'toto'

EXCEPTION 
WHEN NO_DATA_FOUND THEN
...

Curseur

CURSOR c(pk1Value IN VARCHAR2(255)) IS SELECT value FROM table1 WHERE pk1 = 'pk1Value'

OPEN c('toto')
FETCH c INTO var

IF c%NOTFOUND THEN
...