⇒ Her bir rowun sadece bir defa gЎr№lebilmesi iчin

9v†ƒhy’vtÃ9h‡hÃA…‚€ÃHˆy‡vƒyrÃUhiyr†Ã
7øS9@IÃA6aG6ÃU67G@96IÃ96U6ÃTPSBVG6H6FÃ#Ã
SELECT
SELECT
SELECT
Bˆvqryvr†Ã
ç
ç
ç
table1.coulmn, table2.column FROM table1, table2
emp.ename, emp.deptno, dept.deptno, dept.dname FROM emp, dept
emp.ename, emp.deptno, dept.deptno, dept.dname FROM emp, dept WHERE empno = 7788
Uhiyryh…qhxvÃi‡Ã…‚yh…ÕÃt|†‡r…v…Ã8h…‡r†vhÃƒ…‚qˆp‡ÃúˆÃq…ˆ€yh…qhÃhyՁՅ
SELECT
table1.coulmn, table2.column FROM table1, table2 WHERE table1.column conditional_operator table2.column
SELECT
table1.coulmn, table2.column FROM table1, table2 WHERE table1.column = table2.column
SELECT
SELECT
emp.empno, emp.ename, emp.deptno, dept.deptno, dept.loc FROM emp, dept WHERE emp.deptno = dept.deptno
emp.empno, emp.ename, emp.deptno, dept.deptno, dept.loc FROM emp, dept WHERE emp.deptno = dept.deptno AND
INITCAP(emp.ename) = ‘King’
Equijoin
Joinler
Cartesian
Product
Ih€rÃ
Additional Search Condition
ø†‡r’r…rxÃ
#ÃYÃ#Ã2Ã$%łÃt|†‡r…v…
E‚vÃúh…‡ÕÃvu€hyÃrqvyv…†r
E‚vÃúh…‡ÕÃtror…yvÃqr÷vy†r
Sonuç olarak tablr ÃvyrÇhiyr!ÁvÃi‡Ãxh’Õ‡yh…ÕÃrx…hqhÃiv…yrúv…
• 7v…Ãph…‡r†vhÃƒ…‚qˆp‡Ãq‚÷…ˆÃXC@S@Ãpyhˆ†rˆ’yhÃxˆyyhÕyՅ†hÃw‚vÃryqrÃrqvyv…
• ColmnlarՁÃihúՁhÇhiyrÃv†v€yr…vvÃrxyr€r†vÃr…s‚…€h†ÕÃh…‡‡Õ…Õ…
• IÇhiyrÕÃw‚vÃr‡€rxÃvovÃIÖà Ãw‚vÃúh…‡ÕÃtr…rxv…Ã7ˆÃxˆ…hyÃÃp‚€ƒ‚†v‡rÅv€h…’Ã
keyler için geçerli olmayabilir
• UhiyrÃp‚yˆ€yh…ՁqhÃiv…v’yrÃihúxhÃiv…ÃÇhiyrÃp‚yˆ€ˆÃrúv‡yr€r†vqv…
• Q…v€h…’ÉrÃA‚…rvtÃFr’yr…Ãw‚vÃr†h†ÕqhÃr…s‚…€h†ÕÃh…‡‡Õ…Õ…
Detail
Master
EMP
DEPT
Join Condition
EMPNO
SELECT
DEPTNO
DEPTNO
Foreign Key
Primary Key
.empno, r.ename, r.deptno, q.deptno, q.loc FROM emp r, dept q WHERE r.deptno = q.deptno
r
Outer
Join
Non- Equijoin
• UhiyrÃhyvh†yh…Õà ÃvyrÃ"Ãøtvyv“Ãuh…svÃh…h†ÕqhÂyhivyv…
• FՆhÃhyvh†yh…ÃTRGÃx‚qˆˆÃuhsՓhqhÃqhuhÃh“Ã’r…Ãxhƒyh€h†ÕÕÆh÷yh…
• UhiyrÃhyvh†yh…ÆhqrprÃxˆyyhÕyqÕ÷ÕÃTRGƇh‡r€r‡ÕÃvovÃtror…yvqv…
• UhiyrÃp‚yˆ€yh…ՁqhÃiv…v’yrÃihúxhÃiv…ÃÇhiyrÃp‚yˆ€ˆÃrúv‡yr€r€rsidir
SELECT
SELECT
SELECT
SELECT
table1.coulmn, table2.column FROM table1, table2 WHERE table1.column BETWEEN | <= | >= table2.column
e.ename, e.sal, s.grade FROM emp e, salgrade s WHERE e.sal BETWEEN s.losal AND s.hisal
table1.coulmn, table2.column FROM table1, table2 WHERE table1.column = table2.column(+)
emp.empno, emp.ename, emp.deptno, dept.deptno, dept.loc FROM emp, dept WHERE emp.deptno(+) = dept.deptno
ç Her bir rowun sadece bir defa görülebilmesi için
* (PS¶GHNL KLoELU URZXQ 6DO GH÷HUL 6DOJUDGH¶GHNL HQ NoNWHQ
küçük, en büyükten de büyük olmamasÕ JHUHNLU
* 6DOJUDGH WDEOHÕQGDNL /RVDO +LVDO GH÷HUOHULQGHQ KLoELUL
ELUELUL\OH oDNÕúPDPDOÕGÕU
• @„ˆvw‚vyr…qrÃrúv‡yv÷rÃxh…úÕyÕxÃtry€r’rÃ†h‡Õ…yh…ÕÃt|†‡r…v…
• S‚Ãxh…úÕyÕ÷ÕÃrx†vxÂyhÃ‡hiyrÃv†€vvÃ†‚ˆhÃÃvúh…r‡vÃx‚ˆ…
• Pˆ‡r…ÃE‚vÃúh…‡yh…Õ
ÃÃvúh…r‡vÆhqrprÃrúv‡yv÷vÃiv…Çh…hsՁhÃx‚hivyv…
ÃXC@S@Ãpyhˆ†rˆqhÃPSÃih÷yhpÕÉrÃDIƒr…h‡|…ÃxˆyyhÕyh€h“
Self Join
• UhiyrqhxvÃp‚yˆ€yh…qhÃiv…vvÃh’ÕÇhiyrqhxvÃihúxhÃiv…Ãp‚yˆ€ˆÃ…rsr…hs etmesi
SELECT
EMP
worker.ename || ‘ works for ‘ || manager.ename FROM emp worker, emp manager WHERE manager.empno=worker.mgr
EMPNO