Question: DATABASE PROGRAMMING CREATE TABLE dept ( deptno NUMBER(2,0), dname VARCHAR2(14), loc VARCHAR2(13), CONSTRAINT n_pk_dept PRIMARY KEY (deptno) ); CREATE TABLE emp( empno NUMBER(4,0), ename VARCHAR2(10),
DATABASE PROGRAMMING
CREATE TABLE dept ( deptno NUMBER(2,0), dname VARCHAR2(14), loc VARCHAR2(13), CONSTRAINT n_pk_dept PRIMARY KEY (deptno) ); CREATE TABLE emp( empno NUMBER(4,0), ename VARCHAR2(10), job VARCHAR2(9), mgr NUMBER(4,0), hiredate DATE, sal NUMBER(7,2), comm NUMBER(7,2), deptno NUMBER(2,0),
Use table of Employees for this question.
In an anonymous PL/SQL block, define a nested table, called Email_list, that Nested table
will use employees emails as its elements. Define a variable for this type.
- Use the email addresses of those employees in the department (ID) 30 and 60 to populate this nested table.
- Print out the contents of the nested table after having finished the population.
- Display the value of limit of nested table.
- Display the value of the last index.
- Add one elements to the end this nested table, the new email value is GWASHINGTON,
- Display the last element just added,
- Delete the elements 2 and 3,
- Display the current size (count) of this variable,
- Display the value of the last index,
- Print out the existing elements of the nested table.
*** END of the file. ***
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
