sasfvs

Untitled

Jul 5th, 2017
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.42 KB | None | 0 0
  1. SET SERVEROUTPUT  ON;
  2. DECLARE
  3.     v_salary NUMBER(0);
  4. BEGIN
  5.     SELECT salary INTO v_salary FROM employees -- We select from the table of employees the value of salary and put in variable v_salary
  6.     WHERE employee_id = 100; -- we can not put all salaries in one variable, so we select the salary of the employee id equal with 100
  7.     DBMS_OUTPUT.PUT_LINE(v_salary); -- we output the salary stored in the variable
  8. EXCEPTION
  9. END;
Advertisement