Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 NOT NULL
ENAME VARCHAR
JOB VARCHAR
MGR NUMBER
DEPTNO NUMBER
SAL NUMBER
Emp No as the primary key
Create DEPT table with the following structure
NAME TYPE
DEPTNO NUMBER
DNAME VARCHAR
LOC VARCHAR
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 records using a single INSERT ALL commands in both tables
Add constraints to the EMP table to check the EMPNO value while entering ie EMPNO
Add a column DOB to the EMP table.
Update the EMP table to set the commission of all employees to Rs 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 to
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started