ORA-06550: PLS-00428: an INTO clause is expected in this SELECT statement

ORA-06550: PLS-00428: an INTO clause is expected in this SELECT statement

Oracle PL/SQL error message: ORA-06550: PLS-00428: an INTO clause is expected in this SELECT statement.

Cause:

A SELECT statement was executed without INTO clause in a PL/SQL block.

Solution:

Add the INTO clause to the SELECT statement.

Example:

DECLARE
  v_full_name VARCHAR2(500);
BEGIN
  SELECT FIRST_NAME ||' '|| LAST_NAME 
  FROM students 
  WHERE STUDENT_ID=1;
  DBMS_OUTPUT.put_line('v_full_name: '||v_full_name);
END;

Output:

ORA-06550: PLS-00428: an INTO clause is expected in this SELECT statement

Correct:

DECLARE
  v_full_name VARCHAR2(500);
BEGIN
  SELECT FIRST_NAME ||' '|| LAST_NAME 
  INTO v_full_name 
  FROM students 
  WHERE STUDENT_ID=1;
  DBMS_OUTPUT.put_line('v_full_name: '||v_full_name);
END;

Output:

v_full_name: Daniel SCOTT

Oracle tutorial