Introduction to PL/SQL

PL/SQL is Oracle's procedural extension to SQL. It allows you to write logic using variables, conditions, and loops.

DECLARE
  v_name employees.first_name%TYPE;
BEGIN
  SELECT first_name INTO v_name FROM employees WHERE employee_id = 101;
  DBMS_OUTPUT.PUT_LINE(v_name);
END;