Question: Create a table called EMP with the following structure Name Type EMPNO NUMBER ( 6 ) NOT NULL ENAME VARCHAR 2 ( 2 0 )

Create a table called EMP with the following structure
Name Type
EMPNO NUMBER(6) NOT NULL
ENAME VARCHAR2(20)
JOB VARCHAR2(10)
MGR NUMBER(4)
DEPTNO NUMBER(3)
SAL NUMBER(7,2)
Emp No as the primary key
Create DEPT table with the following structure
NAME TYPE
DEPTNO NUMBER(2)
DNAME VARCHAR2(10)
LOC VARCHAR2(10)
Dept No as the Primary Key
Questions to be solved
Add constraints to the EMP table that EMPNO as the PRIMARY KEY and DEPTNO as the FOREIGN KEY.
Inserting 7 records using a single INSERT ALL commands in both tables
Add constraints to the EMP table to check the EMPNO value while entering (i.e) EMPNO >100
Add a column DOB to the EMP table.
Update the EMP table to set the commission of all employees to Rs 1000/- who are working as MANAGERS.
Create a MANAGER table from the EMP table which should hold details only about the managers
List the EMPLOYEE NAMES and the DEPARTMENT NAME in which they are working.
Display the rows whose EMPNO ranges from 1002 to 1005.
Count the total records in the emp table
Display the employee name and department name in which they are working implementing a right outer join

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!