DBMS Practicals For Practical File
DBMS Practicals For Practical File
Emp_details:-
Dept:-
3.Implement the following SQL commands on ‘Emp_details’ and ‘Dept’ tables and show the output:
A) Add a new attribute “Gender” to the Emp_details table.
C)UPDATE the age to 27 for the Employee named “Emily Davis” in “Emp_details” table.
D)Display the details of all the employees in decreasing order of their age from table “emp_details”.
E)Delete the records of those employees whose age is more than 60 from the table “emp_details”.
F)Display the department name and count of employees in each department from the table “Dept”.
G)Write SQL query to display the average salary of Employees.
H)Display the name and age of those employees whose age is more than 25 and surname is “Kumar” from the
table “emp_details”.
I)Calculate and show the average salary of departments -Finance and HR. from the table “Dept”.
J)Write SQL query to display the total number of male Employees in the table.
K)Display the unique departments from the table “Dept”.
L)Display the Name, Address and salaries of the employees who are staying in ‘Vaishali’.
M)Display the employee id, name and salary of all the employees whose department id is either ‘D2’ or ‘D3’.
N)Display the maximum salary in each department.
R)Display emp_id, employee name and department name of all employees whose age is more than 20.
S)Display the average salary of each department.