You are on page 1of 2

1) List out all employees information.

2) List out employees who are not managers.


3) List out employees who joined after WARDjoined.
4) Write a query to display employees with their managers name.
5) List out Employees who are getting salary more than their own managers salary
6) List out all departments where there are no employees.
7) List out employees who are getting salary more than avg salary of dept 20,30.
8) Delete the duplicate employees.
9) List out the employees who are getting 2nd highest salary of employee table.
10)
List out the employees who are getting salary less than average salary of

emp table.
11)
Create table employee empno ,ename, salary, DOB, deptno;
12)
Create table department deptno, dname, loc.
13)
Create primanry key on deptno,
14)
Create primary key on empno of emp table.
15)
Create not null constraint on ename.
16)
Create check constraint on DOB, DOB should be above 1978.
17)
Create foreign key on deptno of emp table which refers deptno of
department with cascade.
18)
Change name of the employee table to employee_info.
19)
Change the department table to dept_1.
20)
Change the name of the column DOB to date_of_birth.
21)
Change the data type of the empno to varchar2(20).
22)
Change the ename size to varchar2(1000).
23)
Find the difference between maximum, minimum salaries of all
departments.
24)
List out empno, count of employees who are repeting.
25)
What is the out put when you fire select * from dual;
26)
Write down the difference between delete and truncate and drop.
27)
Write down the difference between a char and varchar2.
28)
Why composit index will be used, how many max columns can be
included in a composit index?
29)
How many primary keys can be allowed in a table?
30)
Can we insert more than one null in unique key column?
31)
What is core-related sub query?
32)
Difference between sub query and correlated subquery?
33)
What is the difference between inner join and outer join?
34)
Whats the out put of select * from emp,dept? how many rows we will get
(emp have 14 rows and dept has 4 rows).
35)
What is cartigian join?
36)
Delete all record from emp table with structure.
37)
What is the difference between group by and order by.
38)
Where do we use where clause and where do we use having clause?
39)
Create primary on empno,ename.

40)
41)
42)
43)
44)
45)
46)
47)
48)
49)
50)

List out all the joins you know.


Difference between union and union all.
List out the employees who are getting 2nd least salary.
Difference between rownum and rowid.
Add columns to emp table DOB,address with not null constraint.
Drop column dob,address.
Add a default value to ename as A.
List the details of dept where SMITH is working.
What is the out put of select 7 from emp;
Write a query to find employee details where name is SmITh
How many years of exp SMITH has?

You might also like