DatabaseSystem II
DatabaseSystem II
Question 01
Question 02
1.) Write SQL statement to create a Department table with the PRIMARY KEY constraint.
(Marks 05)
2.) Write the following queries in SQL using above relations:
a) Display the salaries of all the employees’ with employee name and designation
according to ascending order of employee name.
(Marks 05)
b) Display the unique designations for the employees. (Marks 05)
c) List out all the employee names whose designation is ‘CLERK’. (Marks 05)
d) Find the employee names whose salaries are less than 3500. (Marks 05)
Page 1 of 2
Question 03
1.) Find the average salaries of all the employees who work as ‘ANALYST’.
(Marks 04)
2.) Find the employee names whose are either ‘CLERK’ or ‘MANAGER’ designation.
(Marks 04)
3.) Find the employee names, designations and salaries with department names.
(Marks 05)
4.) Find the employee names whose salary grade is 4.
(Marks 06)
5.) List all the employee names except ‘CLERK’ and ‘MANAGER’ designations according to
the descending order of salaries. (Marks 06)
Question 04
2.) Create a stored procedure to get the employee name, and dob of all employees from the
above Employee table. (Marks 07)
3.) Create a view employee with emp_id, emp_name and salary where salary=55000 from
employee table. (Marks 07)
4.) What is difference between DELETE and TRUNCATE commands? (Marks 06)
Question 05
Page 2 of 2