Skip to content

Instantly share code, notes, and snippets.

@adityadaniel
Created June 3, 2017 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adityadaniel/3c0da5fecda67221ba4f695cdfd7a61b to your computer and use it in GitHub Desktop.
Save adityadaniel/3c0da5fecda67221ba4f695cdfd7a61b to your computer and use it in GitHub Desktop.
DECLARE
x number;
v_fname employees.first_name%type;
v_lname employees.last_name%type;
BEGIN
SELECT first_name,
last_name INTO v_fname,
v_lname
FROM employees
WHERE employee_id=100;
x:= 0;
LOOP x := x+1;
IF x > 5 THEN exit;
END IF;
dbms_output.put_line('Nama karyawan adalah: ' || v_fname || ' ' || v_lname || ' Looping ke-' || x);
END LOOP;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment