A new database named 'DBMS' was created, and an 'employee' table was established with various employee records. The table includes details such as department number, name, employee number, name, salary, and joining date, with six records inserted. Various queries were executed to retrieve employee data, including total employees, total salary, and formatting of joining dates.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views
SEM-4 SQL Assignment - Copy
A new database named 'DBMS' was created, and an 'employee' table was established with various employee records. The table includes details such as department number, name, employee number, name, salary, and joining date, with six records inserted. Various queries were executed to retrieve employee data, including total employees, total salary, and formatting of joining dates.
mysql> select * from employee where emp_name ='%n';
Empty set (0.00 sec) mysql> select count(emp_no) as Total_Employee from employee; +----------------+ | Total_Employee | +----------------+ | 6| +----------------+ 1 row in set (0.01 sec)
mysql> select sum(emp_salary) as Total_Salary from
employee; +--------------+ | Total_Salary | +--------------+ | 246000 | +--------------+ 1 row in set (0.00 sec)
mysql> select max(emp_salary) as Highest_Employee_Salary