Display the details of all employees?
Ans: Select * from emp;
Display the department information from department table?
Ans: select * from dept;
Display the name and job for all the employees?
Ans: select ename,job from emp;
Display the name and salary for all the employees?
Ans: select ename,sal from emp;
Display the employee no and totalsalary for all the employees?
Ans: select empno,sal+comm as total from emp group by empno;
Display the employee name and annual salary for all employees.
Ans: select ename,sal * 12 as annual salary from emp;
Display the names of all the employees who are working in depart number 10.
Ans: select emame from emp where deptno=10;
Display the names of all the employees who are working as clerks and drawing a salary more than 3000.
Ans: select ename from emp where job='CLERKS' and sal>3000;
Display the employee number and name who are earning comm?
Ans: select empno,ename from emp where comm is not null;
Display the employee number and name who do not earn any comm?
Ans: select empno,ename from emp where comm is null;
No comments:
Post a Comment
Do you want to comment