Q1. Consider the
following Employee table:
Table Name: Employee
The primary key
of this table is Employee_ID and Manager_ID is a foreign key that references
Employee_ID.
Write SQL
commands for the following:
(a) Create the
above table.
(b) Insert
values as shown above.
(c) Delete the
Employee having Employee_ID 1217.
(d) Update the
salary of “Amyra” to 40000.
(e) Alter the
table Employee so that NULL values are not allowed for Age column.
(f) Write a
query to display names and salaries of those employees whose salary are
greater than
20000.
(g) Write a
query to display details of employees who are not getting any bonus.
(h) Write a
query to display the names of employees whose name contains “a” as the last
alphabet.
(i) Write a
query to display the name and Job title of those employees whose Manager_ID is
1201.
(j) Write a
query to display the name and Job title of those employees whose Manager is
“Amyra”.
(k) Write a
query to display the name and Job title of those employees aged between 26
years and 30 years (both
inclusive)
Where is answer?
ReplyDelete