Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Createing table: create table employee (eid number(5), ename varchar(20), sal number(10), comm
number(10), job varchar(10), dno number(5));
Query:
1.select table.
Query: select * from emp where d_no = 20 and job not in ('clerk','salesman','analyst');
SQL QUERIES
Query: select ename from employee where comm > (select sal from employee);
SQL QUERIES
7.display emp name,salary whose salary is grater than that of all managers.
Query: select ename, sal from employee sal > (select sal from employee where job = 'manager');
SQL QUERIES
8. display emp name,salary whose salary is grater than that of any managers of any dept.
Query: select ename, sal from employee sal < (select sal from employee where job = 'manager');
10.give list of all emp along with theirs monthly and annual income.
11.display emp whose salary between 10000 and 30000 both inclusive.
12.find min salary of managers in various dept having salary > 20000
SQL QUERIES
13. display details of emp with annual salary and sort data on basis of annual salary.
15. find emp name who having the job in dept 10 but not in 20.
employee(e_no,e_name,d_no,job,hiredate)
(a)e_no number(20) primary key
dept(d_no,d_name,loc)