Using Select statement in PL/SQL

Select statement in PL/SQL


DECLARE
  v_fname VARCHAR2(20);
  v_lname VARCHAR(20);
BEGIN
  SELECT first_name, last_name
  INTO v_fname,v_lname
  FROM employees
  WHERE employee_id=100;
  dbms_output.put_line('First_name: '||v_fname);
  dbms_output.put_line('Last_name: '||v_lname);
END;

output:

Leave a Reply

Your email address will not be published. Required fields are marked *