ORA-01403 no data found

ORA-01403 no data found

Error
ORA-01403 no data found

SQL> Declare
2 l_id NUMBER;
3 BEGIN
4 SELECT id INTO l_id FROM test1 WHERE name = 'RAM1';
5 /* do something with emp data */
6 END;
7 /
Declare
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 4

Cause
During the fetching of data from the object in PL/SQL queries then then object return no data.

Solution
No data found means that specific filter data is not available in the object.
We need to insert that data or we need to check the table having data then correct our query.

SQL> select * from test1;

ID NAME
---------- ----------
1 RAM
2 sham
3 POOJA

SQL> Declare
2 l_id NUMBER;
3 BEGIN
4 SELECT id INTO l_id FROM test1 WHERE name = 'RAM';
5 /* do something with emp data */
6 END;
7 /

PL/SQL procedure successfully completed.

OERR error Output

oerr ora 01403
01403, 00000, “no data found”
*Cause: No data was found from the objects.
Action: There was no data from the objects which may be due to end of fetch.

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply