Escolar Documentos
Profissional Documentos
Cultura Documentos
2) Display all the records in EMP table where employee belongs to deptno 10?
3) Display all the records in EMP table where employee does not belong to deptno 30?
(Or)
7) Display all the records in EMP table order by ascending deptno, descending salary?
(Or)
10) Display the records in EMP table where MGR in 7698, 7566 and Sal should be greater
then 1500
Select * from EMP where mgr in (7698, 7566) and Sal > 1500;
11) Display all employees where employees hired before 01-JAN-1981
13) Display all employees where their salary is less then the Fords salary?
Select * from EMP where < (select Sal from EMP where ename = 'FORD');
14) Display all the records in EMP table along with the rowid?
15) Display all records in EMP table those were joined before SCOTT joined?
Select * from EMP Where hiredate< (Select hiredate from EMP where ename = 'SCOTT');
18) Display all the records in EMP table where employee hired after 28-SEP-81 and before
03-DEC-81?
20) Display all employees whose salary greater then the manager salary?
Select * from EMP where Sal> (select max (Sal) from EMP where job like 'MANAGER');
22) Display all employees where ename start with J and ends with S
24) Display all employees where jobs does not belong to PRESIDENT and MANAGER?
27) Display all records in EMP table for employee who does not receive any commission
28) Display all ename where first character could be anything, but second character should
be L?
29) Display sum of salary for each department. The output should be in one record
30) Display all department with Minimum salary and maximum salary?
32) Display ename, deptno from EMP table with format of {ename} belongs to {deptno}
33) Display total number of employees hired for 1980, 1981, 1982. The output should be in
one record.
34) Display all the records for deptno which belongs to employee name JAMES?
Select * from EMP where deptno = (select deptno from EMP where ENAME='JAMES');
35) Display all the records in EMP table where salary should be less then or equal to
ADAMS salary?
Select * from EMP where Sal <= (select SAL from EMP where ENAME='ADAMS');
36) Display all employees those were joined before employee WARD joined?
Select * from EMP where hiredate < (select HIREDATE from EMP where ENAME='WARD');
37) Display all record in EMP table for deptno which belongs to KING's Job?
Select * from Where deptno = (select DEPTNO from EMP where ename='KING');
38) Display the employees for empno which belongs to job PRESIDENT?
39) Display list of ename those who have joined in Year 81 as MANAGER?
Select ename from EMP where hiredate in (%-%-81') (Select hiredate from EMP where job=
'MANAGER');
Select * from EMP where deptno= (select deptno from deptno where loc='DALLAS');
43) Delete all employees those are not getting any commission?
Delete EMP where deptno= (Select deptno from EMP where ename='SMITH');
46) Remove all employees who were joined before SMITH joined?
Delete from EMP Where hiredate< (Select hiredate from EMP where ename='SMITH');
47) Rename the employee name JONES to ANDY
Update EMP Set Sal = (Select Sal from EMP where ename='SMITH') Where ename='MARTIN';
49) Display the Empno, Ename, job, Hiredate, Exp of all Mgrs
Select empno, ename, job, hiredate, months_between (sysdate, hiredate) exp from EMP where
empno in (Select mgr
STUB DRIVER
Dummy program for lower level components Dummy program for higher level components
50) How many test cases can you write per day?
Application complex->20+
DISTINCT UNIQUE
It is keyword It is constraints
It retrieve distinct values It allows only unique values
53) Normalization?
2.2NF
3.3NF
3. Create separate table for each group of table & finding each row uniquely using PK.
2. Here we make relationship between one table to another table by using FK.
2. It removes the entire columns which are not dependent on primary key
54) De-Normalization?
1. Source performance: From here sources will get and sent to ODS.
4. All the operations done on source their chances of data getting lost or completed.