Error Description:
----------------------------------
You tried to write a Select statement inside PL/SQL and it returns with the error like,
LINE/COL ERROR
-------- -----------------------------------------------------------------
60/1 PLS-00428: an INTO clause is expected in this SELECT statement
Cause of The Error:
---------------------------------------
Inside PL/SQL you just ran the select statement as you did in SQL. The INTO clause of a SELECT INTO statement was omitted. For example, inside PL/SQL you wrote SELECT * FROM dept WHERE ... instead of
SELECT * INTO dept_rec FROM dept WHERE ...
In PL/SQL, only a subquery is written without an INTO clause.
Solution of The Error:
--------------------------------
Merely to execute the statement just add execute keyword. Like instead of SELECT * FROM dept WHERE .. use EXECUTE IMMEDIATE 'SELECT * FROM dept WHERE ...';
Or add the required INTO clause which is used to store the data returned from select statement.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment