Professional Documents
Culture Documents
Assignment 1 DBMS
Assignment 1 DBMS
(c) Show all details of the emp table. Create a query to display the employee
number, name, job, hire date for each employee.
(d)Name the above column headings as Emp #, Employee, Job, and Hire Date,
respectively.
(e) Create a query to display unique job names from the emp table.
(f) Display the employee names concatenated with the jobs, separated by a comma
and space, and rename the column as Employee and Title.
(g)Create a query to display all the data from the emp table. Separate each column
by a comma. Replace null values with 0.Name the column THE_OUTPUT.
select
concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(con
cat(concat(concat('',empno),','),ename),','),job),','),COALESCE(mgr,0)),','),hiredate),','),sal),','),
COALESCE(comm,0)),','),deptno) as The_Output from emp;
(j) Display name, salary, annual compensation of employees. It calculates the annual
compensation as monthly salary multiplied by 12 and then add commission to it.