Beruflich Dokumente
Kultur Dokumente
Structured Query
Language
SQL is the language used to
communicate with the Oracle
Database.
STUDENT
Number Max()
Min()
Date
Avg()
Conversion Count()
Group Functions
SQL> Select
empno,name,emp.deptno,dname from
emp,dept where
emp.deptno=dept.deptno
SQL>Select w.ename,w.esal,m.ename,m.esal
from emp w,emp m where w.sal>m.sal and
w.mgr = m.empno;
EMP
Empno Ename Esal Deptno Mgr
100 Anil 4000 10 102
101 Ajay 3200 20 103
Example of Outer-Join :
Display all departments which are not present in the EMP table.
Primary Key
Unique
Check
Foreign Key
Table creation using
column constraints
Syntax:
3. Display the employees who earn more than the highest paid
employee in deptno 30
5.. Which Employees in New York draw a salary more than Scott
6.. Display all emp who have same job as Clark or have a salary
greater than his salary
SQL > Select * from emp where job = ( Select job from emp where
ename = ‘Clark’) OR esal > (Select esal from emp where ename =
‘Clark’);
Thank You