Practical 4 Dbms
Practical 4 Dbms
Practical - 4
Queries to be performed:
To create table Employee:
CREATE TABLE Employe (empno VARCHAR(80), name VARCHAR(80), job VARCHAR(80), mgr
VARCHAR(80), hiredate DATE, sal VARCHAR(80), comm VARCHAR(80), deptno VARCHAR(80));
Queries to be performed:
(1) Write a query to display the current date. Label the column Date.
Output:
Output:
(3) Modify your query no 4.(2) to add a column that subtracts the old salary from the new salary. Label
the column Increase.
Output:
Output:
(5)Write a query that produces the following for each employee: <employee last name> earns <salary>
monthly.
Output:
Output:
(7) Display the hiredate of emp in a format that appears as Seventh of June 1994 12:00:00 AM.
Output:
(8) Write a query to calculate the annual compensation of all employees (sal+comm.).
Output:
*******