-- emptab.sql

DECLARE
	TYPE emp_tab IS TABLE OF employee%ROWTYPE;
	emp emp_tab := emp_tab();
BEGIN
	emp.EXTEND;
	SELECT * INTO emp(1) FROM employee WHERE id = 7111;
	emp.EXTEND;
	SELECT * INTO emp(2) FROM employee WHERE id = 7881;
	emp.EXTEND;
	emp(3) := emp(2);
	emp(3).id := 10007;
	emp(3).store_number := 3;
	emp.DELETE(2);
	emp.EXTEND;
	IF emp.EXISTS(2) THEN
		emp(4) := emp(2);
	ELSE
		emp(4) := emp(emp.NEXT(2));
	END IF;
END;
/


