home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p025 / 4.img < prev    next >
Unknown  |  1992-05-03  |  156.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Alias PIX Image (image/aliasPIX) ext Supported
66% dexvert GEM Raster Bitmap (image/gem) ext Supported
66% dexvert DaVinci (image/daVinci) ext Supported
46% dexvert Disk Image (archive/diskImage) ext Supported
1% dexvert AIX/BFF backup/restore (archive/aixBackupRestore) ext Unsupported
1% dexvert The Duplicator Toolkit disk image (archive/duplicatorToolkitDiskImage) ext Unsupported
1% dexvert PTS-DOS disk image (archive/ptsDOSDiskImage) ext Unsupported
1% dexvert QNX volume disk image (archive/qnxVolumeDiskImage) ext Unsupported
1% dexvert SNATCH-IT Disk Image (archive/snatchItDiskImage) ext Unsupported
1% dexvert Android boot image (archive/androidBootImage) ext Unsupported
1% dexvert Paragon DOS disk image (archive/paragonDOSDiskImage) ext Unsupported
1% dexvert QEMU QCOW Image (archive/qemuQCOWImage) ext Unsupported
1% dexvert Davilex Games game data format (other/davilexGamesGameDataFormat) ext Unsupported
1% dexvert Eclipse Image (other/eclipseImage) ext Unsupported
1% dexvert InfoComics game data (other/infoComicsGameData) ext Unsupported
1% dexvert Garmin map (other/garminMap) ext Unsupported
1% dexvert Piklib/BlooMoo graphic data (other/piklibGraphicData) ext Unsupported
100% file data default
100% gt2 Kopftext: ' By itself, a' default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 20 42 79 20 69 74 73 65 | 6c 66 2c 20 61 00 46 53 | By itse|lf, a.FS|
|00000010| 45 4c 45 43 54 20 73 74 | 61 74 65 6d 65 6e 74 20 |ELECT st|atement |
|00000020| 69 73 20 61 20 71 75 65 | 72 79 3b 20 69 74 20 69 |is a que|ry; it i|
|00000030| 73 20 61 20 73 75 62 71 | 75 65 72 79 20 77 68 65 |s a subq|uery whe|
|00000040| 6e 20 75 73 65 64 20 61 | 73 20 61 20 63 6c 61 75 |n used a|s a clau|
|00000050| 73 65 20 69 6e 00 46 61 | 6e 6f 74 68 65 72 20 73 |se in.Fa|nother s|
|00000060| 74 61 74 65 6d 65 6e 74 | 2e 20 20 54 68 65 20 46 |tatement|. The F|
|00000070| 52 4f 4d 20 63 6c 61 75 | 73 65 20 69 73 20 72 65 |ROM clau|se is re|
|00000080| 71 75 69 72 65 64 3b 20 | 61 6c 6c 20 6f 74 68 65 |quired; |all othe|
|00000090| 72 20 63 6c 61 75 73 65 | 73 20 61 72 65 00 4b 6f |r clause|s are.Ko|
|000000a0| 70 74 69 6f 6e 61 6c 2e | 20 20 54 68 65 20 63 6c |ptional.| The cl|
|000000b0| 61 75 73 65 73 20 6d 75 | 73 74 20 62 65 20 69 6e |auses mu|st be in|
|000000c0| 20 74 68 65 20 6f 72 64 | 65 72 20 73 68 6f 77 6e | the ord|er shown|
|000000d0| 20 62 65 6c 6f 77 20 77 | 68 65 6e 20 75 73 65 64 | below w|hen used|
|000000e0| 20 74 6f 67 65 74 68 65 | 72 3a fe 00 03 2a 20 20 | togethe|r:...* |
|000000f0| 53 45 4c 45 43 54 20 41 | 4c 4c 20 7c 20 44 49 53 |SELECT A|LL | DIS|
|00000100| 54 49 4e 43 54 20 2a 20 | 7c 20 74 61 62 6c 65 2e |TINCT * || table.|
|00000110| 2a 20 7c 20 65 78 70 72 | 00 1b 20 20 61 6c 69 61 |* | expr|.. alia|
|00000120| 73 2c fe 2e 03 28 64 65 | 66 61 75 6c 74 20 69 73 |s,...(de|fault is|
|00000130| 20 41 4c 4c 29 00 24 fe | 20 04 46 52 4f 4d 20 75 | ALL).$.| .FROM u|
|00000140| 73 65 72 2e 74 61 62 6c | 65 2c 20 74 61 62 6c 65 |ser.tabl|e, table|
|00000150| 20 61 6c 69 61 73 2c fe | 2e 03 00 13 fe 20 04 57 | alias,.|..... .W|
|00000160| 48 45 52 45 20 63 6f 6e | 64 69 74 69 6f 6e 00 2e |HERE con|dition..|
|00000170| fe 20 04 43 4f 4e 4e 45 | 43 54 20 42 59 20 63 6f |. .CONNE|CT BY co|
|00000180| 6e 64 69 74 69 6f 6e 20 | 20 53 54 41 52 54 20 57 |ndition | START W|
|00000190| 49 54 48 20 63 6f 6e 64 | 69 74 69 6f 6e 00 2b fe |ITH cond|ition.+.|
|000001a0| 20 04 47 52 4f 55 50 20 | 42 59 20 65 78 70 72 2c | .GROUP |BY expr,|
|000001b0| 20 65 78 70 72 fe 2e 03 | 20 48 41 56 49 4e 47 20 | expr...| HAVING |
|000001c0| 63 6f 6e 64 69 74 69 6f | 6e 00 28 fe 20 04 55 4e |conditio|n.(. .UN|
|000001d0| 49 4f 4e 20 7c 20 49 4e | 54 45 52 53 45 43 54 20 |ION | IN|TERSECT |
|000001e0| 7c 20 4d 49 4e 55 53 20 | 20 53 45 4c 45 43 54 fe || MINUS | SELECT.|
|000001f0| 2e 03 00 22 fe 20 04 4f | 52 44 45 52 20 42 59 20 |...". .O|RDER BY |
|00000200| 65 78 70 72 20 7c 20 41 | 53 43 20 7c 20 44 45 53 |expr | A|SC | DES|
|00000210| 43 2c fe 2e 03 00 2b fe | 20 04 46 4f 52 20 55 50 |C,....+.| .FOR UP|
|00000220| 44 41 54 45 20 4f 46 20 | 63 6f 6c 75 6d 6e 2c 20 |DATE OF |column, |
|00000230| 63 6f 6c 75 6d 6e fe 2e | 03 20 4e 4f 57 41 49 54 |column..|. NOWAIT|
|00000240| 3b fe 00 03 11 68 6b 79 | 77 72 64 07 46 68 6b 79 |;....hky|wrd.Fhky|
|00000250| 77 72 64 07 47 68 6b 79 | 77 72 64 07 48 68 6b 79 |wrd.Ghky|wrd.Hhky|
|00000260| 77 72 64 07 49 68 6b 79 | 77 72 64 07 4a 68 6b 79 |wrd.Ihky|wrd.Jhky|
|00000270| 77 72 64 07 4b 68 6b 79 | 77 72 64 07 4c 68 6b 79 |wrd.Khky|wrd.Lhky|
|00000280| 77 72 64 07 4d 68 6b 79 | 77 72 64 07 4e 68 6b 79 |wrd.Mhky|wrd.Nhky|
|00000290| 77 72 64 07 4f 68 6b 79 | 77 72 64 07 50 68 6b 79 |wrd.Ohky|wrd.Phky|
|000002a0| 77 72 64 07 51 68 6b 79 | 77 72 64 07 52 68 6b 79 |wrd.Qhky|wrd.Rhky|
|000002b0| 77 72 64 07 53 68 6b 79 | 77 72 64 07 54 68 6b 79 |wrd.Shky|wrd.Thky|
|000002c0| 77 72 64 07 55 68 6b 79 | 77 72 64 07 56 00 14 2d |wrd.Uhky|wrd.V..-|
|000002d0| 00 16 00 01 00 00 06 59 | fe 00 05 05 71 75 65 72 |.......Y|....quer|
|000002e0| 79 00 17 2d 00 25 00 01 | 00 00 06 5a fe 00 05 08 |y..-.%..|...Z....|
|000002f0| 73 75 62 71 75 65 72 79 | 00 1d 61 00 09 00 05 00 |subquery|..a.....|
|00000300| 00 04 a4 fe 00 05 0e 41 | 4c 4c 20 7c 20 44 49 53 |.......A|LL | DIS|
|00000310| 54 49 4e 43 54 00 1a 2a | 00 18 00 05 00 00 04 a4 |TINCT..*|........|
|00000320| fe 00 05 0b 2a 20 7c 20 | 74 61 62 6c 65 2e 2a 00 |....* | |table.*.|
|00000330| 13 2d 00 26 00 05 00 00 | 04 74 fe 00 05 04 65 78 |.-.&....|.t....ex|
|00000340| 70 72 00 14 2d 00 02 00 | 06 00 00 05 b5 fe 00 05 |pr..-...|........|
|00000350| 05 61 6c 69 61 73 00 13 | 2d 00 04 00 07 00 00 06 |.alias..|-.......|
|00000360| 45 fe 00 05 04 46 52 4f | 4d 00 14 2d 00 04 00 08 |E....FRO|M..-....|
|00000370| 00 00 06 47 fe 00 05 05 | 57 48 45 52 45 00 18 2d |...G....|WHERE..-|
|00000380| 00 0a 00 08 00 00 04 79 | fe 00 05 09 63 6f 6e 64 |.......y|....cond|
|00000390| 69 74 69 6f 6e 00 19 2d | 00 04 00 09 00 00 06 4b |ition..-|.......K|
|000003a0| fe 00 05 0a 43 4f 4e 4e | 45 43 54 20 42 59 00 19 |....CONN|ECT BY..|
|000003b0| 2d 00 1a 00 09 00 00 06 | 4b fe 00 05 0a 53 54 41 |-.......|K....STA|
|000003c0| 52 54 20 57 49 54 48 00 | 17 67 00 04 00 0a 00 00 |RT WITH.|.g......|
|000003d0| 06 49 fe 00 05 08 47 52 | 4f 55 50 20 42 59 00 15 |.I....GR|OUP BY..|
|000003e0| 2d 00 1b 00 0a 00 00 06 | 49 fe 00 05 06 48 41 56 |-.......|I....HAV|
|000003f0| 49 4e 47 00 28 75 00 04 | 00 0b 00 00 04 a1 fe 00 |ING.(u..|........|
|00000400| 05 19 55 4e 49 4f 4e 20 | 7c 20 49 4e 54 45 52 53 |..UNION || INTERS|
|00000410| 45 43 54 20 7c 20 4d 49 | 4e 55 53 00 17 2d 00 04 |ECT | MI|NUS..-..|
|00000420| 00 0c 00 00 06 4d fe 00 | 05 08 4f 52 44 45 52 20 |.....M..|..ORDER |
|00000430| 42 59 00 1c 66 00 04 00 | 0d 00 00 06 4f fe 00 05 |BY..f...|....O...|
|00000440| 0d 46 4f 52 20 55 50 44 | 41 54 45 20 4f 46 00 15 |.FOR UPD|ATE OF..|
|00000450| 2d 00 24 00 0d 00 00 06 | 4f fe 00 05 06 4e 4f 57 |-.$.....|O....NOW|
|00000460| 41 49 54 00 09 01 00 00 | 06 18 fe 00 03 01 00 09 |AIT.....|........|
|00000470| 01 00 00 06 2d fe 00 03 | 01 03 ff 00 1e 00 24 54 |....-...|......$T|
|00000480| 68 65 20 53 45 4c 45 43 | 54 fe 2e 03 49 4e 54 4f |he SELEC|T...INTO|
|00000490| 20 53 74 61 74 65 6d 65 | 6e 74 20 28 50 4c 2f 53 | Stateme|nt (PL/S|
|000004a0| 51 4c 29 02 68 63 6e 74 | 78 74 02 2d 68 63 6e 74 |QL).hcnt|xt.-hcnt|
|000004b0| 78 74 02 2e 00 1e 00 4a | 46 6f 72 20 65 61 63 68 |xt.....J|For each|
|000004c0| 20 69 74 65 6d 20 69 6e | 20 74 68 65 20 53 45 4c | item in| the SEL|
|000004d0| 45 43 54 5f 6c 69 73 74 | 2c 20 53 45 4c 45 43 54 |ECT_list|, SELECT|
|000004e0| fe 2e 03 49 4e 54 4f 20 | 72 65 74 72 69 65 76 65 |...INTO |retrieve|
|000004f0| 73 20 61 20 76 61 6c 75 | 65 20 46 52 4f 4d 20 74 |s a valu|e FROM t|
|00000500| 68 65 00 44 73 70 65 63 | 69 66 69 65 64 20 74 61 |he.Dspec|ified ta|
|00000510| 62 6c 65 28 73 29 2c 20 | 61 6e 64 20 70 75 74 73 |ble(s), |and puts|
|00000520| 20 74 68 65 20 76 61 6c | 75 65 20 49 4e 54 4f 20 | the val|ue INTO |
|00000530| 69 74 73 20 70 61 72 61 | 6c 6c 65 6c 20 69 74 65 |its para|llel ite|
|00000540| 6d 20 69 6e 20 74 68 65 | 00 43 76 61 72 69 61 62 |m in the|.Cvariab|
|00000550| 6c 65 5f 6c 69 73 74 2e | 20 20 54 68 65 20 64 61 |le_list.| The da|
|00000560| 74 61 74 79 70 65 73 20 | 6f 66 20 63 6f 72 72 65 |tatypes |of corre|
|00000570| 73 70 6f 6e 64 69 6e 67 | 20 69 74 65 6d 73 20 69 |sponding| items i|
|00000580| 6e 20 74 68 65 20 74 61 | 62 6c 65 73 2c 00 42 53 |n the ta|bles,.BS|
|00000590| 45 4c 45 43 54 5f 6c 69 | 73 74 2c 20 61 6e 64 20 |ELECT_li|st, and |
|000005a0| 76 61 72 69 61 62 6c 65 | 5f 6c 69 73 74 20 20 6d |variable|_list m|
|000005b0| 75 73 74 20 62 65 20 63 | 6f 6d 70 61 74 69 62 6c |ust be c|ompatibl|
|000005c0| 65 20 6f 72 20 63 6f 6e | 76 65 72 74 69 62 6c 65 |e or con|vertible|
|000005d0| 2e fe 00 03 4a 53 74 6f | 72 65 20 72 65 74 72 69 |....JSto|re retri|
|000005e0| 65 76 65 64 20 64 61 74 | 61 20 69 6e 20 61 20 72 |eved dat|a in a r|
|000005f0| 65 63 6f 72 64 20 76 61 | 72 69 61 62 6c 65 20 62 |ecord va|riable b|
|00000600| 79 20 64 65 63 6c 61 72 | 69 6e 67 20 74 68 65 20 |y declar|ing the |
|00000610| 72 65 63 6f 72 64 20 76 | 61 72 69 61 62 6c 65 00 |record v|ariable.|
|00000620| 22 66 69 72 73 74 20 77 | 69 74 68 20 74 68 65 20 |"first w|ith the |
|00000630| 25 52 4f 57 54 59 50 45 | 20 61 74 74 72 69 62 75 |%ROWTYPE| attribu|
|00000640| 74 65 2e fe 00 03 07 53 | 79 6e 74 61 78 3a fe 00 |te.....S|yntax:..|
|00000650| 03 23 fe 20 05 53 45 4c | 45 43 54 5f 6c 69 73 74 |.#. .SEL|ECT_list|
|00000660| 20 49 4e 54 4f 20 76 61 | 72 69 61 62 6c 65 5f 6c | INTO va|riable_l|
|00000670| 69 73 74 00 1e fe 20 09 | 46 52 4f 4d 20 74 61 62 |ist... .|FROM tab|
|00000680| 6c 65 2c 20 74 61 62 6c | 65 2c fe 2e 03 00 1b fe |le, tabl|e,......|
|00000690| 20 09 72 65 73 74 5f 6f | 66 5f 73 74 61 74 65 6d | .rest_o|f_statem|
|000006a0| 65 6e 74 3b fe 00 03 18 | 45 78 61 6d 70 6c 65 20 |ent;....|Example |
|000006b0| 6f 66 20 53 45 4c 45 43 | 54 fe 2e 03 49 4e 54 4f |of SELEC|T...INTO|
|000006c0| fe 00 03 07 44 45 43 4c | 41 52 45 00 fe 20 05 64 |....DECL|ARE.. .d|
|000006d0| 65 70 74 5f 72 65 63 fe | 20 07 64 65 70 74 25 52 |ept_rec.| .dept%R|
|000006e0| 4f 57 54 59 50 45 3b 00 | 22 fe 20 04 6e 61 6d 65 |OWTYPE;.|". .name|
|000006f0| fe 20 0b 65 6d 70 2e 65 | 6e 61 6d 65 25 54 59 50 |. .emp.e|name%TYP|
|00000700| 45 3b 00 1f fe 20 04 6a | 6f 62 5f 74 69 74 6c 65 |E;... .j|ob_title|
|00000710| fe 20 06 65 6d 70 6a 6f | 62 25 54 59 50 45 3b 00 |. .empjo|b%TYPE;.|
|00000720| fe 20 05 77 61 67 65 73 | fe 20 0a 65 6d 70 2e 73 |. .wages|. .emp.s|
|00000730| 61 6c 25 54 59 50 45 3b | 00 05 42 45 47 49 4e 00 |al%TYPE;|..BEGIN.|
|00000740| 1a fe 20 04 53 45 4c 45 | 43 54 20 2a 20 49 4e 54 |.. .SELE|CT * INT|
|00000750| 4f 20 64 65 70 74 5f 72 | 65 63 00 0d fe 20 04 46 |O dept_r|ec... .F|
|00000760| 52 4f 4d 20 64 65 70 74 | 00 16 fe 20 04 57 48 45 |ROM dept|... .WHE|
|00000770| 52 45 20 64 65 70 74 6e | 6f 20 3d 20 32 30 3b 00 |RE deptn|o = 20;.|
|00000780| 36 fe 20 04 53 45 4c 45 | 43 54 20 65 6e 61 6d 65 |6. .SELE|CT ename|
|00000790| 2c 20 6a 6f 62 2c 20 73 | 61 6c 20 49 4e 54 4f 20 |, job, s|al INTO |
|000007a0| 6e 61 6d 65 2c 20 6a 6f | 62 5f 74 69 74 6c 65 2c |name, jo|b_title,|
|000007b0| 20 77 61 67 65 73 00 0c | fe 20 04 46 52 4f 4d 20 | wages..|. .FROM |
|000007c0| 65 6d 70 00 1e fe 20 0b | 57 48 45 52 45 20 65 6d |emp... .|WHERE em|
|000007d0| 70 6e 6f 20 3d 20 31 34 | 34 30 3b 00 16 fe 20 04 |pno = 14|40;... .|
|000007e0| fe 2e 03 28 72 65 73 74 | 20 6f 66 20 62 6c 6f 63 |...(rest| of bloc|
|000007f0| 6b 29 00 0a fe 20 06 45 | 4e 44 3b fe 00 03 08 68 |k)... .E|ND;....h|
|00000800| 6b 79 77 72 64 07 57 68 | 6b 79 77 72 64 07 58 68 |kywrd.Wh|kywrd.Xh|
|00000810| 6b 79 77 72 64 07 59 68 | 6b 79 77 72 64 07 5a 68 |kywrd.Yh|kywrd.Zh|
|00000820| 6b 79 77 72 64 07 5b 68 | 6b 79 77 72 64 07 5c 68 |kywrd.[h|kywrd.\h|
|00000830| 6b 79 77 72 64 07 5d 68 | 6b 79 77 72 64 07 5e 00 |kywrd.]h|kywrd.^.|
|00000840| 1a 74 00 15 fe 00 04 06 | 55 fe 00 05 0b 53 45 4c |.t......|U....SEL|
|00000850| 45 43 54 5f 6c 69 73 74 | 00 1a 2d 00 36 00 03 00 |ECT_list|..-.6...|
|00000860| 00 04 87 fe 00 05 0b 63 | 6f 6e 76 65 72 74 69 62 |.......c|onvertib|
|00000870| 6c 65 00 17 72 00 0f 00 | 06 00 00 04 b7 fe 00 05 |le..r...|........|
|00000880| 08 25 52 4f 57 54 59 50 | 45 00 15 2d 00 05 00 0a |.%ROWTYP|E..-....|
|00000890| 00 00 06 18 fe 00 05 06 | 53 45 4c 45 43 54 00 16 |........|SELECT..|
|000008a0| 2d fe 00 03 10 00 00 05 | ed fe 00 05 07 44 45 43 |-.......|.....DEC|
|000008b0| 4c 41 52 45 00 17 72 00 | 17 00 11 00 00 04 b7 fe |LARE..r.|........|
|000008c0| 00 05 08 25 52 4f 57 54 | 59 50 45 00 14 2d fe 00 |...%ROWT|YPE..-..|
|000008d0| 03 15 00 00 05 e7 fe 00 | 05 05 42 45 47 49 4e 00 |........|..BEGIN.|
|000008e0| 12 2d 00 06 00 1d 00 00 | 05 f3 fe 00 05 03 45 4e |.-......|......EN|
|000008f0| 44 00 09 01 00 00 06 2b | fe 00 03 01 00 09 01 00 |D......+|........|
|00000900| 00 06 2f fe 00 03 01 05 | 45 00 1d 00 2d 54 68 65 |../.....|E...-The|
|00000910| 20 53 45 54 20 54 52 41 | 4e 53 41 43 54 49 4f 4e | SET TRA|NSACTION|
|00000920| 20 52 45 41 44 20 4f 4e | 4c 59 20 53 74 61 74 65 | READ ON|LY State|
|00000930| 6d 65 6e 74 20 28 53 51 | 4c 29 02 68 63 6e 74 78 |ment (SQ|L).hcntx|
|00000940| 74 02 2f 68 63 6e 74 78 | 74 02 30 00 1d 00 49 53 |t./hcntx|t.0...IS|
|00000950| 45 54 20 54 52 41 4e 53 | 41 43 54 49 4f 4e 20 52 |ET TRANS|ACTION R|
|00000960| 45 41 44 20 4f 4e 4c 59 | 20 61 66 66 65 63 74 73 |EAD ONLY| affects|
|00000970| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 74 72 61 | the cur|rent tra|
|00000980| 6e 73 61 63 74 69 6f 6e | 2e 20 41 6c 6c 20 71 75 |nsaction|. All qu|
|00000990| 65 72 69 65 73 20 69 6e | 00 4a 74 68 65 20 74 72 |eries in|.Jthe tr|
|000009a0| 61 6e 73 61 63 74 69 6f | 6e 20 69 67 6e 6f 72 65 |ansactio|n ignore|
|000009b0| 20 63 68 61 6e 67 65 73 | 20 62 79 20 6f 74 68 65 | changes| by othe|
|000009c0| 72 20 75 73 65 72 73 20 | 73 69 6e 63 65 20 74 68 |r users |since th|
|000009d0| 65 20 74 72 61 6e 73 61 | 63 74 69 6f 6e 20 62 65 |e transa|ction be|
|000009e0| 67 61 6e 2e 00 4b 53 45 | 54 20 54 52 41 4e 53 41 |gan..KSE|T TRANSA|
|000009f0| 43 54 49 4f 4e 20 52 45 | 41 44 20 4f 4e 4c 59 20 |CTION RE|AD ONLY |
|00000a00| 69 73 20 65 73 70 65 63 | 69 61 6c 6c 79 20 75 73 |is espec|ially us|
|00000a10| 65 66 75 6c 20 66 6f 72 | 20 67 65 6e 65 72 61 74 |eful for| generat|
|00000a20| 69 6e 67 20 72 65 70 6f | 72 74 73 20 77 68 69 63 |ing repo|rts whic|
|00000a30| 68 00 44 71 75 65 72 79 | 20 6d 75 6c 74 69 70 6c |h.Dquery| multipl|
|00000a40| 65 20 74 61 62 6c 65 73 | 20 74 68 61 74 20 61 72 |e tables| that ar|
|00000a50| 65 20 63 6f 6e 73 74 61 | 6e 74 6c 79 20 62 65 69 |e consta|ntly bei|
|00000a60| 6e 67 20 75 70 64 61 74 | 65 64 20 62 79 20 6f 74 |ng updat|ed by ot|
|00000a70| 68 65 72 73 2e 20 41 00 | 38 43 4f 4d 4d 49 54 20 |hers. A.|8COMMIT |
|00000a80| 6f 72 20 61 20 52 4f 4c | 4c 42 41 43 4b 20 73 74 |or a ROL|LBACK st|
|00000a90| 61 74 65 6d 65 6e 74 20 | 65 6e 64 73 20 74 68 65 |atement |ends the|
|00000aa0| 20 72 65 61 64 20 6f 6e | 6c 79 20 73 74 61 74 65 | read on|ly state|
|00000ab0| 2e fe 00 03 25 53 79 6e | 74 61 78 3a fe 20 04 53 |....%Syn|tax:. .S|
|00000ac0| 45 54 20 54 52 41 4e 53 | 41 43 54 49 4f 4e 20 52 |ET TRANS|ACTION R|
|00000ad0| 45 41 44 20 4f 4e 4c 59 | 3b fe 00 03 43 59 6f 75 |EAD ONLY|;...CYou|
|00000ae0| 20 63 61 6e 6e 6f 74 20 | 75 73 65 20 61 20 44 45 | cannot |use a DE|
|00000af0| 4c 45 54 45 2c 20 49 4e | 53 45 52 54 2c 20 6f 72 |LETE, IN|SERT, or|
|00000b00| 20 55 50 44 41 54 45 20 | 73 74 61 74 65 6d 65 6e | UPDATE |statemen|
|00000b10| 74 20 69 6e 20 61 20 52 | 45 41 44 20 4f 4e 4c 59 |t in a R|EAD ONLY|
|00000b20| 00 49 74 72 61 6e 73 61 | 63 74 69 6f 6e 3b 20 6f |.Itransa|ction; o|
|00000b30| 6e 6c 79 20 71 75 65 72 | 69 65 73 20 61 72 65 20 |nly quer|ies are |
|00000b40| 70 65 72 6d 69 74 74 65 | 64 2e 20 41 63 74 69 6f |permitte|d. Actio|
|00000b50| 6e 73 20 6f 66 20 6f 74 | 68 65 72 20 75 73 65 72 |ns of ot|her user|
|00000b60| 73 20 61 6e 64 20 6f 74 | 68 65 72 00 4a 74 72 61 |s and ot|her.Jtra|
|00000b70| 6e 73 61 63 74 69 6f 6e | 73 20 61 72 65 20 6e 6f |nsaction|s are no|
|00000b80| 74 20 61 66 66 65 63 74 | 65 64 2e 20 53 45 54 20 |t affect|ed. SET |
|00000b90| 54 52 41 4e 53 41 43 54 | 49 4f 4e 20 52 45 41 44 |TRANSACT|ION READ|
|00000ba0| 20 4f 4e 4c 59 20 6d 75 | 73 74 20 62 65 20 74 68 | ONLY mu|st be th|
|00000bb0| 65 20 66 69 72 73 74 00 | 1d 73 74 61 74 65 6d 65 |e first.|.stateme|
|00000bc0| 6e 74 20 69 6e 20 74 68 | 65 20 74 72 61 6e 73 61 |nt in th|e transa|
|00000bd0| 63 74 69 6f 6e 2e fe 00 | 03 24 45 78 61 6d 70 6c |ction...|.$Exampl|
|00000be0| 65 20 6f 66 20 53 45 54 | 20 54 52 41 4e 53 41 43 |e of SET| TRANSAC|
|00000bf0| 54 49 4f 4e 20 52 45 41 | 44 20 4f 4e 4c 59 fe 00 |TION REA|D ONLY..|
|00000c00| 03 43 41 20 63 6f 6d 70 | 61 6e 79 20 72 75 6e 73 |.CA comp|any runs|
|00000c10| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 73 | the fol|lowing s|
|00000c20| 74 61 74 65 6d 65 6e 74 | 73 20 61 74 20 74 68 65 |tatement|s at the|
|00000c30| 20 65 6e 64 20 6f 66 20 | 65 61 63 68 20 6d 6f 6e | end of |each mon|
|00000c40| 74 68 20 74 6f 00 35 69 | 6e 76 65 6e 74 6f 72 79 |th to.5i|nventory|
|00000c50| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 73 | the num|ber of s|
|00000c60| 68 69 70 73 20 61 6e 64 | 20 63 6f 6e 74 61 69 6e |hips and| contain|
|00000c70| 65 72 73 20 69 74 20 6f | 77 6e 73 3a fe 00 03 0f |ers it o|wns:....|
|00000c80| fe 20 08 43 4f 4d 4d 49 | 54 3b 00 22 fe 20 08 53 |. .COMMI|T;.". .S|
|00000c90| 45 54 20 54 52 41 4e 53 | 41 43 54 49 4f 4e 20 52 |ET TRANS|ACTION R|
|00000ca0| 45 41 44 20 4f 4e 4c 59 | 3b 00 22 fe 20 08 53 45 |EAD ONLY|;.". .SE|
|00000cb0| 4c 45 43 54 20 43 4f 55 | 4e 54 28 2a 29 20 46 52 |LECT COU|NT(*) FR|
|00000cc0| 4f 4d 20 73 68 69 70 3b | 00 27 fe 20 08 53 45 4c |OM ship;|.'. .SEL|
|00000cd0| 45 43 54 20 43 4f 55 4e | 54 28 2a 29 20 46 52 4f |ECT COUN|T(*) FRO|
|00000ce0| 4d 20 63 6f 6e 74 61 69 | 6e 65 72 3b 00 0f fe 20 |M contai|ner;... |
|00000cf0| 08 43 4f 4d 4d 49 54 3b | fe 00 03 46 54 68 65 20 |.COMMIT;|...FThe |
|00000d00| 6c 61 73 74 20 43 4f 4d | 4d 49 54 20 69 73 20 75 |last COM|MIT is u|
|00000d10| 73 65 64 20 74 6f 20 65 | 6e 64 20 74 68 65 20 72 |sed to e|nd the r|
|00000d20| 65 61 64 2d 6f 6e 6c 79 | 20 74 72 61 6e 73 61 63 |ead-only| transac|
|00000d30| 74 69 6f 6e 3b 20 74 68 | 65 72 65 20 61 72 65 20 |tion; th|ere are |
|00000d40| 6e 6f 00 2a 63 68 61 6e | 67 65 73 20 74 6f 20 74 |no.*chan|ges to t|
|00000d50| 68 65 20 64 61 74 61 62 | 61 73 65 20 74 6f 20 6d |he datab|ase to m|
|00000d60| 61 6b 65 20 70 65 72 6d | 61 6e 65 6e 74 2e fe 00 |ake perm|anent...|
|00000d70| 03 4a 45 76 65 72 79 20 | 53 45 4c 45 43 54 20 69 |.JEvery |SELECT i|
|00000d80| 6e 20 61 20 72 65 61 64 | 2d 6f 6e 6c 79 20 74 72 |n a read|-only tr|
|00000d90| 61 6e 73 61 63 74 69 6f | 6e 20 72 65 66 65 72 73 |ansactio|n refers|
|00000da0| 20 74 6f 20 74 68 65 20 | 73 61 6d 65 20 73 6e 61 | to the |same sna|
|00000db0| 70 73 68 6f 74 20 6f 66 | 20 74 68 65 00 42 64 61 |pshot of| the.Bda|
|00000dc0| 74 61 62 61 73 65 2c 20 | 67 69 76 69 6e 67 20 61 |tabase, |giving a|
|00000dd0| 20 6d 75 6c 74 69 2d 74 | 61 62 6c 65 2c 20 6d 75 | multi-t|able, mu|
|00000de0| 6c 74 69 2d 71 75 65 72 | 79 2c 20 72 65 61 64 2d |lti-quer|y, read-|
|00000df0| 63 6f 6e 73 69 73 74 65 | 6e 74 20 76 69 65 77 2e |consiste|nt view.|
|00000e00| fe 00 03 06 68 6b 79 77 | 72 64 07 5f 68 6b 79 77 |....hkyw|rd._hkyw|
|00000e10| 72 64 07 60 68 6b 79 77 | 72 64 07 61 68 6b 79 77 |rd.`hkyw|rd.ahkyw|
|00000e20| 72 64 07 62 68 6b 79 77 | 72 64 07 63 68 6b 79 77 |rd.bhkyw|rd.chkyw|
|00000e30| 72 64 07 64 00 1a 74 00 | 2e fe 00 04 04 7c fe 00 |rd.d..t.|.....|..|
|00000e40| 05 0b 74 72 61 6e 73 61 | 63 74 69 6f 6e 00 16 71 |..transa|ction..q|
|00000e50| 00 3f fe 00 04 06 59 fe | 00 05 07 71 75 65 72 69 |.?....Y.|...queri|
|00000e60| 65 73 00 15 2d fe 00 03 | 04 00 00 05 eb fe 00 05 |es..-...|........|
|00000e70| 06 43 4f 4d 4d 49 54 00 | 17 72 00 0c 00 04 00 00 |.COMMIT.|.r......|
|00000e80| 06 15 fe 00 05 08 52 4f | 4c 4c 42 41 43 4b 00 18 |......RO|LLBACK..|
|00000e90| 2d fe 00 03 0b 00 00 05 | dc fe 00 05 09 73 74 61 |-.......|.....sta|
|00000ea0| 74 65 6d 65 6e 74 00 28 | 2d 00 08 00 13 00 00 06 |tement.(|-.......|
|00000eb0| 2d fe 00 05 19 53 45 54 | 20 54 52 41 4e 53 41 43 |-....SET| TRANSAC|
|00000ec0| 54 49 4f 4e 20 52 45 41 | 44 20 4f 4e 4c 59 00 09 |TION REA|D ONLY..|
|00000ed0| 01 00 00 06 2d fe 00 03 | 01 00 09 01 00 00 06 41 |....-...|.......A|
|00000ee0| fe 00 03 01 03 43 00 11 | 00 25 54 68 65 20 55 50 |.....C..|.%The UP|
|00000ef0| 44 41 54 45 20 53 74 61 | 74 65 6d 65 6e 74 20 28 |DATE Sta|tement (|
|00000f00| 53 51 4c 20 61 6e 64 20 | 50 4c 2f 53 51 4c 29 02 |SQL and |PL/SQL).|
|00000f10| 68 63 6e 74 78 74 02 31 | 68 63 6e 74 78 74 02 32 |hcntxt.1|hcntxt.2|
|00000f20| 00 11 00 48 55 50 44 41 | 54 45 20 72 65 70 6c 61 |...HUPDA|TE repla|
|00000f30| 63 65 73 20 74 68 65 20 | 76 61 6c 75 65 73 20 69 |ces the |values i|
|00000f40| 6e 20 72 6f 77 73 20 6f | 66 20 6f 6e 65 20 6f 72 |n rows o|f one or|
|00000f50| 20 6d 6f 72 65 20 73 70 | 65 63 69 66 69 65 64 20 | more sp|ecified |
|00000f60| 63 6f 6c 75 6d 6e 73 20 | 77 69 74 68 00 4a 74 68 |columns |with.Jth|
|00000f70| 65 20 76 61 6c 75 65 73 | 20 66 72 6f 6d 20 61 20 |e values| from a |
|00000f80| 53 51 4c 20 65 78 70 72 | 65 73 73 69 6f 6e 20 6f |SQL expr|ession o|
|00000f90| 72 20 61 20 53 45 4c 45 | 43 54 20 73 74 61 74 65 |r a SELE|CT state|
|00000fa0| 6d 65 6e 74 2e 20 53 45 | 4c 45 43 54 20 6d 75 73 |ment. SE|LECT mus|
|00000fb0| 74 20 72 65 74 75 72 6e | 00 49 61 74 20 6c 65 61 |t return|.Iat lea|
|00000fc0| 73 74 20 6f 6e 65 20 72 | 6f 77 2c 20 61 6e 64 20 |st one r|ow, and |
|00000fd0| 65 76 65 72 79 20 63 6f | 6c 75 6d 6e 20 74 6f 20 |every co|lumn to |
|00000fe0| 74 68 65 20 6c 65 66 74 | 20 6f 66 20 74 68 65 20 |the left| of the |
|00000ff0| 3d 20 73 69 67 6e 2e 20 | 20 53 45 4c 45 43 54 20 |= sign. | SELECT |
|00001000| 6d 61 79 00 47 6e 6f 74 | 20 63 6f 6e 74 61 69 6e |may.Gnot| contain|
|00001010| 20 61 6e 20 49 4e 54 4f | 20 63 6c 61 75 73 65 2e | an INTO| clause.|
|00001020| 20 20 55 73 65 20 74 68 | 65 20 57 48 45 52 45 20 | Use th|e WHERE |
|00001030| 63 6c 61 75 73 65 20 74 | 6f 20 73 70 65 63 69 66 |clause t|o specif|
|00001040| 79 20 63 6f 6e 64 69 74 | 69 6f 6e 73 00 48 72 6f |y condit|ions.Hro|
|00001050| 77 73 20 6d 75 73 74 20 | 6d 65 65 74 20 69 6e 20 |ws must |meet in |
|00001060| 6f 72 64 65 72 20 74 6f | 20 62 65 20 75 70 64 61 |order to| be upda|
|00001070| 74 65 64 3b 20 69 66 20 | 79 6f 75 20 6f 6d 69 74 |ted; if |you omit|
|00001080| 20 74 68 65 20 57 48 45 | 52 45 20 63 6c 61 75 73 | the WHE|RE claus|
|00001090| 65 2c 20 61 6c 6c 00 11 | 72 6f 77 73 20 61 72 65 |e, all..|rows are|
|000010a0| 20 75 70 64 61 74 65 64 | 2e fe 00 03 07 53 79 6e | updated|.....Syn|
|000010b0| 74 61 78 3a fe 00 03 1e | fe 20 04 55 50 44 41 54 |tax:....|. .UPDAT|
|000010c0| 45 20 74 61 62 6c 65 2f | 76 69 65 77 5f 6e 61 6d |E table/|view_nam|
|000010d0| 65 20 53 45 54 00 31 fe | 20 08 63 6f 6c 75 6d 6e |e SET.1.| .column|
|000010e0| 5f 6e 61 6d 65 20 3d 20 | 73 71 6c 5f 65 78 70 72 |_name = |sql_expr|
|000010f0| 65 73 73 69 6f 6e 20 28 | 53 51 4c 20 6f 70 74 69 |ession (|SQL opti|
|00001100| 6f 6e 29 00 3f fe 20 08 | 63 6f 6c 75 6d 6e 5f 6e |on).?. .|column_n|
|00001110| 61 6d 65 20 3d 20 28 6f | 6e 65 5f 76 61 6c 75 65 |ame = (o|ne_value|
|00001120| 5f 53 45 4c 45 43 54 5f | 73 74 61 74 65 6d 65 6e |_SELECT_|statemen|
|00001130| 74 29 20 28 53 51 4c 20 | 6f 70 74 69 6f 6e 29 00 |t) (SQL |option).|
|00001140| 46 fe 20 08 28 63 6f 6c | 75 6d 6e 5f 6e 61 6d 65 |F. .(col|umn_name|
|00001150| 2c 20 63 6f 6c 75 6d 6e | 5f 6e 61 6d 65 2c fe 2e |, column|_name,..|
|00001160| 03 29 20 3d 20 53 45 4c | 45 43 54 5f 73 74 61 74 |.) = SEL|ECT_stat|
|00001170| 65 6d 65 6e 74 20 28 53 | 51 4c 20 6f 70 74 69 6f |ement (S|QL optio|
|00001180| 6e 29 00 13 fe 20 06 57 | 48 45 52 45 5f 63 6c 61 |n)... .W|HERE_cla|
|00001190| 75 73 65 3b 00 34 fe 20 | 06 57 48 45 52 45 20 43 |use;.4. |.WHERE C|
|000011a0| 55 52 52 45 4e 54 20 4f | 46 20 63 75 72 73 6f 72 |URRENT O|F cursor|
|000011b0| 5f 6e 61 6d 65 3b 20 20 | 28 50 4c 2f 53 51 4c 20 |_name; |(PL/SQL |
|000011c0| 6f 70 74 69 6f 6e 29 fe | 00 03 34 49 6e 20 50 4c |option).|..4In PL|
|000011d0| 2f 53 51 4c 2c 20 57 48 | 45 52 45 20 43 55 52 52 |/SQL, WH|ERE CURR|
|000011e0| 45 4e 54 20 4f 46 20 75 | 70 64 61 74 65 73 20 74 |ENT OF u|pdates t|
|000011f0| 68 65 20 63 75 72 72 65 | 6e 74 20 72 6f 77 2e fe |he curre|nt row..|
|00001200| 00 03 02 68 6b 79 77 72 | 64 07 65 68 6b 79 77 72 |...hkywr|d.ehkywr|
|00001210| 64 07 66 00 14 77 00 06 | 00 0d 00 00 06 47 fe 00 |d.f..w..|.....G..|
|00001220| 05 05 57 48 45 52 45 00 | 1f 2d 00 06 00 0e 00 00 |..WHERE.|.-......|
|00001230| 06 41 fe 00 05 10 57 48 | 45 52 45 20 43 55 52 52 |.A....WH|ERE CURR|
|00001240| 45 4e 54 20 4f 46 00 09 | 01 00 00 06 2f fe 00 03 |ENT OF..|..../...|
|00001250| 01 00 09 01 00 00 06 45 | fe 00 03 01 05 20 00 1f |.......E|..... ..|
|00001260| 00 25 54 68 65 20 57 48 | 45 52 45 20 43 55 52 52 |.%The WH|ERE CURR|
|00001270| 45 4e 54 20 4f 46 20 43 | 6c 61 75 73 65 20 69 6e |ENT OF C|lause in|
|00001280| 20 50 4c 2f 53 51 4c 02 | 68 63 6e 74 78 74 02 33 | PL/SQL.|hcntxt.3|
|00001290| 68 63 6e 74 78 74 02 34 | 00 1f 00 49 55 73 65 20 |hcntxt.4|...IUse |
|000012a0| 74 68 65 20 57 48 45 52 | 45 20 f7 21 ff 43 55 52 |the WHER|E .!.CUR|
|000012b0| 52 45 4e 54 20 4f 46 20 | 63 75 72 73 6f 72 5f 6e |RENT OF |cursor_n|
|000012c0| 61 6d 65 20 63 6c 61 75 | 73 65 20 69 6e 20 61 20 |ame clau|se in a |
|000012d0| 50 4c 2f 53 51 4c 20 70 | 72 6f 67 72 61 6d 20 74 |PL/SQL p|rogram t|
|000012e0| 6f 20 55 50 44 41 54 45 | 00 48 6f 72 20 44 45 4c |o UPDATE|.Hor DEL|
|000012f0| 45 54 45 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ETE the |current |
|00001300| 72 6f 77 2d 2d 74 68 65 | 20 6f 6e 65 20 6c 61 73 |row--the| one las|
|00001310| 74 20 61 63 63 65 73 73 | 65 64 20 77 69 74 68 20 |t access|ed with |
|00001320| 61 20 46 45 54 43 48 20 | 73 74 61 74 65 6d 65 6e |a FETCH |statemen|
|00001330| 74 3b 00 4b 74 68 65 20 | 6e 61 6d 65 64 20 63 75 |t;.Kthe |named cu|
|00001340| 72 73 6f 72 20 6d 75 73 | 74 20 62 65 20 6f 70 65 |rsor mus|t be ope|
|00001350| 6e 20 61 6e 64 20 70 6f | 73 69 74 69 6f 6e 65 64 |n and po|sitioned|
|00001360| 20 6f 6e 20 61 20 72 6f | 77 2e 20 54 6f 20 75 73 | on a ro|w. To us|
|00001370| 65 20 57 48 45 52 45 20 | 43 55 52 52 45 4e 54 00 |e WHERE |CURRENT.|
|00001380| 48 4f 46 2c 20 46 4f 52 | 20 55 50 44 41 54 45 20 |HOF, FOR| UPDATE |
|00001390| 4f 46 20 6d 75 73 74 20 | 68 61 76 65 20 62 65 65 |OF must |have bee|
|000013a0| 6e 20 75 73 65 64 20 69 | 6e 20 74 68 65 20 64 65 |n used i|n the de|
|000013b0| 63 6c 61 72 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |claratio|n of the|
|000013c0| 20 63 75 72 73 6f 72 27 | 73 00 06 71 75 65 72 79 | cursor'|s..query|
|000013d0| 2e ff 00 03 46 54 68 65 | 20 69 6d 70 6c 69 63 69 |....FThe| implici|
|000013e0| 74 20 53 51 4c 25 20 63 | 75 72 73 6f 72 20 61 6e |t SQL% c|ursor an|
|000013f0| 64 20 65 78 70 6c 69 63 | 69 74 20 63 75 72 73 6f |d explic|it curso|
|00001400| 72 20 61 74 74 72 69 62 | 75 74 65 73 20 6c 65 74 |r attrib|utes let|
|00001410| 20 79 6f 75 20 61 63 63 | 65 73 73 00 4a 75 73 65 | you acc|ess.Juse|
|00001420| 66 75 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ful info|rmation |
|00001430| 61 62 6f 75 74 20 74 68 | 65 20 65 78 65 63 75 74 |about th|e execut|
|00001440| 69 6f 6e 20 6f 66 20 61 | 6e 20 55 50 44 41 54 45 |ion of a|n UPDATE|
|00001450| 20 6f 72 20 61 20 44 45 | 4c 45 54 45 20 73 74 61 | or a DE|LETE sta|
|00001460| 74 65 6d 65 6e 74 2e ff | 00 03 1b 45 78 61 6d 70 |tement..|...Examp|
|00001470| 6c 65 20 6f 66 20 57 48 | 45 52 45 20 43 55 52 52 |le of WH|ERE CURR|
|00001480| 45 4e 54 20 4f 46 ff 00 | 03 49 54 68 69 73 20 50 |ENT OF..|.IThis P|
|00001490| 4c 2f 53 51 4c 20 63 6f | 64 65 20 64 6f 65 73 20 |L/SQL co|de does |
|000014a0| 74 68 65 20 61 63 74 69 | 6f 6e 73 20 6c 69 73 74 |the acti|ons list|
|000014b0| 65 64 20 69 6e 20 61 20 | 74 61 62 6c 65 20 63 61 |ed in a |table ca|
|000014c0| 6c 6c 65 64 20 54 4f 44 | 41 59 2c 20 73 65 74 74 |lled TOD|AY, sett|
|000014d0| 69 6e 67 00 4b 73 74 61 | 74 75 73 20 74 6f 20 44 |ing.Ksta|tus to D|
|000014e0| 4f 4e 45 20 66 6f 72 20 | 61 63 74 69 6f 6e 73 20 |ONE for |actions |
|000014f0| 63 6f 6d 70 6c 65 74 65 | 64 3b 20 66 6f 72 20 65 |complete|d; for e|
|00001500| 78 61 6d 70 6c 65 2c 20 | 61 63 74 69 6f 6e 73 20 |xample, |actions |
|00001510| 74 6f 20 62 65 20 74 61 | 6b 65 6e 20 6f 6e 20 61 |to be ta|ken on a|
|00001520| 00 30 74 61 62 6c 65 20 | 6f 66 20 61 63 63 6f 75 |.0table |of accou|
|00001530| 6e 74 20 62 61 6c 61 6e | 63 65 73 20 61 74 20 74 |nt balan|ces at t|
|00001540| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 64 61 |he end o|f the da|
|00001550| 79 2e ff 00 03 07 44 45 | 43 4c 41 52 45 00 32 ff |y.....DE|CLARE.2.|
|00001560| 20 07 43 55 52 53 4f 52 | 20 63 31 20 49 53 20 53 | .CURSOR| c1 IS S|
|00001570| 45 4c 45 43 54 20 61 63 | 74 69 6f 6e 2c 20 61 63 |ELECT ac|tion, ac|
|00001580| 63 74 20 46 52 4f 4d 20 | 74 6f 64 61 79 00 1f ff |ct FROM |today...|
|00001590| 20 0a 46 4f 52 20 55 50 | 44 41 54 45 20 4f 46 20 | .FOR UP|DATE OF |
|000015a0| 73 74 61 74 75 73 3b 00 | 21 ff 20 07 74 68 65 5f |status;.|!. .the_|
|000015b0| 61 63 74 69 6f 6e 20 74 | 6f 64 61 79 2e 61 63 74 |action t|oday.act|
|000015c0| 25 54 59 50 45 3b 00 ff | 20 08 61 63 63 74 5f 6e |%TYPE;..| .acct_n|
|000015d0| 75 6d 20 74 6f 64 61 79 | 2e 61 63 63 74 25 54 59 |um today|.acct%TY|
|000015e0| 50 45 3b 00 08 ff 20 03 | 42 45 47 49 4e 00 0e ff |PE;... .|BEGIN...|
|000015f0| 20 06 4f 50 45 4e 20 63 | 31 3b 00 0a ff 20 06 4c | .OPEN c|1;... .L|
|00001600| 4f 4f 50 00 29 ff 20 06 | 46 45 54 43 48 20 63 31 |OOP.). .|FETCH c1|
|00001610| 20 49 4e 54 4f 20 74 68 | 65 5f 61 63 74 69 6f 6e | INTO th|e_action|
|00001620| 2c 20 61 63 63 74 5f 6e | 75 6d 3b 00 41 ff 20 0b |, acct_n|um;.A. .|
|00001630| 45 58 49 54 20 57 48 45 | 4e 20 63 31 25 4e 4f 54 |EXIT WHE|N c1%NOT|
|00001640| 46 4f 55 4e 44 3b 20 28 | 73 74 61 74 65 6d 65 6e |FOUND; (|statemen|
|00001650| 74 73 20 74 6f 20 70 65 | 72 66 6f 72 6d 20 61 63 |ts to pe|rform ac|
|00001660| 74 69 6f 6e 73 29 00 26 | ff 20 06 55 50 44 41 54 |tions).&|. .UPDAT|
|00001670| 45 20 74 6f 64 61 79 20 | 53 45 54 20 73 74 61 74 |E today |SET stat|
|00001680| 75 73 20 3d 20 27 64 6f | 6e 65 27 00 1f ff 20 0b |us = 'do|ne'... .|
|00001690| 57 48 45 52 45 20 43 55 | 52 52 45 4e 54 20 4f 46 |WHERE CU|RRENT OF|
|000016a0| 20 63 31 3b 00 0d ff 20 | 04 45 4e 44 20 4c 4f 4f | c1;... |.END LOO|
|000016b0| 50 3b 00 0d ff 20 04 43 | 4c 4f 53 45 20 63 31 3b |P;... .C|LOSE c1;|
|000016c0| 00 0b ff 20 04 43 4f 4d | 4d 49 54 3b 00 04 45 4e |... .COM|MIT;..EN|
|000016d0| 44 3b ff 00 03 0f 68 6b | 79 77 72 64 07 67 68 6b |D;....hk|ywrd.ghk|
|000016e0| 79 77 72 64 07 68 68 6b | 79 77 72 64 07 69 68 6b |ywrd.hhk|ywrd.ihk|
|000016f0| 79 77 72 64 07 6a 68 6b | 79 77 72 64 07 6b 68 6b |ywrd.jhk|ywrd.khk|
|00001700| 79 77 72 64 07 6c 68 6b | 79 77 72 64 07 6d 68 6b |ywrd.lhk|ywrd.mhk|
|00001710| 79 77 72 64 07 6e 68 6b | 79 77 72 64 07 6f 68 6b |ywrd.nhk|ywrd.ohk|
|00001720| 79 77 72 64 07 70 68 6b | 79 77 72 64 07 71 68 6b |ywrd.phk|ywrd.qhk|
|00001730| 79 77 72 64 07 72 68 6b | 79 77 72 64 07 73 68 6b |ywrd.rhk|ywrd.shk|
|00001740| 79 77 72 64 07 74 68 6b | 79 77 72 64 07 75 00 15 |ywrd.thk|ywrd.u..|
|00001750| 2f 00 31 ff 00 04 04 b0 | ff 00 05 06 50 4c 2f 53 |/.1.....|....PL/S|
|00001760| 51 4c 00 15 75 00 43 ff | 00 04 06 2f ff 00 05 06 |QL..u.C.|.../....|
|00001770| 55 50 44 41 54 45 00 15 | 64 00 03 00 01 00 00 05 |UPDATE..|d.......|
|00001780| f1 ff 00 05 06 44 45 4c | 45 54 45 00 1c 66 00 04 |.....DEL|ETE..f..|
|00001790| 00 03 00 00 06 4f ff 00 | 05 0d 46 4f 52 20 55 50 |.....O..|..FOR UP|
|000017a0| 44 41 54 45 20 4f 46 00 | 23 2d 00 04 00 06 00 00 |DATE OF.|#-......|
|000017b0| 04 cb ff 00 05 14 69 6d | 70 6c 69 63 69 74 20 53 |......im|plicit S|
|000017c0| 51 4c 25 20 63 75 72 73 | 6f 72 00 29 2d 00 1d 00 |QL% curs|or.)-...|
|000017d0| 06 00 00 04 c9 ff 00 05 | 1a 65 78 70 6c 69 63 69 |........|.explici|
|000017e0| 74 20 63 75 72 73 6f 72 | 20 61 74 74 72 69 62 75 |t cursor| attribu|
|000017f0| 74 65 73 00 15 2f 00 05 | 00 0b 00 00 04 b0 ff 00 |tes../..|........|
|00001800| 05 06 50 4c 2f 53 51 4c | 00 16 2d ff 00 03 0f 00 |..PL/SQL|..-.....|
|00001810| 00 05 ed ff 00 05 07 44 | 45 43 4c 41 52 45 00 1c |.......D|ECLARE..|
|00001820| 66 00 0a 00 11 00 00 06 | 4f ff 00 05 0d 46 4f 52 |f.......|O....FOR|
|00001830| 20 55 50 44 41 54 45 20 | 4f 46 00 13 2d 00 06 00 | UPDATE |OF..-...|
|00001840| 15 00 00 06 11 ff 00 05 | 04 4f 50 45 4e 00 13 2d |........|.OPEN..-|
|00001850| 00 06 00 16 00 00 04 ce | ff 00 05 04 4c 4f 4f 50 |........|....LOOP|
|00001860| 00 14 2d 00 06 00 17 00 | 00 05 fb ff 00 05 05 46 |..-.....|.......F|
|00001870| 45 54 43 48 00 13 2d 00 | 0b 00 18 00 00 05 f9 ff |ETCH..-.|........|
|00001880| 00 05 04 45 58 49 54 00 | 15 75 00 06 00 19 00 00 |...EXIT.|.u......|
|00001890| 06 2f ff 00 05 06 55 50 | 44 41 54 45 00 1f 2d 00 |./....UP|DATE..-.|
|000018a0| 0b 00 1a 00 00 06 41 ff | 00 05 10 57 48 45 52 45 |......A.|...WHERE|
|000018b0| 20 43 55 52 52 45 4e 54 | 20 4f 46 00 09 01 00 00 | CURRENT| OF.....|
|000018c0| 06 41 ff 00 03 01 00 09 | 01 00 00 06 47 ff 00 03 |.A......|....G...|
|000018d0| 01 01 cc 00 0a 00 16 54 | 68 65 20 46 52 4f 4d 20 |.......T|he FROM |
|000018e0| 43 6c 61 75 73 65 20 69 | 6e 20 53 51 4c 02 68 63 |Clause i|n SQL.hc|
|000018f0| 6e 74 78 74 02 35 68 63 | 6e 74 78 74 02 36 00 0a |ntxt.5hc|ntxt.6..|
|00001900| 00 4b 54 68 65 20 46 52 | 4f 4d 20 63 6c 61 75 73 |.KThe FR|OM claus|
|00001910| 65 20 69 64 65 6e 74 69 | 66 69 65 73 20 6f 6e 65 |e identi|fies one|
|00001920| 20 6f 72 20 6d 6f 72 65 | 20 74 61 62 6c 65 73 20 | or more| tables |
|00001930| 66 72 6f 6d 20 77 68 69 | 63 68 20 74 6f 20 53 45 |from whi|ch to SE|
|00001940| 4c 45 43 54 20 72 6f 77 | 73 2c 20 6f 72 00 49 74 |LECT row|s, or.It|
|00001950| 68 65 20 74 61 62 6c 65 | 20 66 72 6f 6d 20 77 68 |he table| from wh|
|00001960| 69 63 68 20 74 6f 20 44 | 45 4c 45 54 45 20 72 6f |ich to D|ELETE ro|
|00001970| 77 73 2e 20 20 49 66 20 | 74 68 65 20 74 61 62 6c |ws. If |the tabl|
|00001980| 65 20 69 73 20 6e 6f 74 | 20 79 6f 75 72 73 2c 20 |e is not| yours, |
|00001990| 79 6f 75 20 6d 75 73 74 | 00 4b 73 70 65 63 69 66 |you must|.Kspecif|
|000019a0| 79 20 74 68 65 20 75 73 | 65 72 20 28 6f 77 6e 65 |y the us|er (owne|
|000019b0| 72 29 2e 20 20 40 64 61 | 74 61 62 61 73 65 6c 69 |r). @da|tabaseli|
|000019c0| 6e 6b 20 72 65 66 65 72 | 73 20 74 6f 20 61 20 76 |nk refer|s to a v|
|000019d0| 61 6c 69 64 20 72 65 6d | 6f 74 65 20 64 61 74 61 |alid rem|ote data|
|000019e0| 62 61 73 65 2e ff 00 03 | 07 53 79 6e 74 61 78 3a |base....|.Syntax:|
|000019f0| ff 00 03 0f ff 20 04 53 | 45 4c 45 43 54 20 6c 69 |..... .S|ELECT li|
|00001a00| 73 74 00 1a ff 20 07 46 | 52 4f 4d 20 74 61 62 6c |st... .F|ROM tabl|
|00001a10| 65 20 57 48 45 52 45 ff | 2e 03 00 1e ff 20 04 44 |e WHERE.|..... .D|
|00001a20| 45 4c 45 54 45 20 46 52 | 4f 4d 20 74 61 62 6c 65 |ELETE FR|OM table|
|00001a30| 20 57 48 45 52 45 ff 2e | 03 00 2a ff 20 07 46 52 | WHERE..|..*. .FR|
|00001a40| 4f 4d 20 75 73 65 72 2e | 74 61 62 6c 65 20 61 6c |OM user.|table al|
|00001a50| 69 61 73 20 40 64 61 74 | 61 62 61 73 65 6c 69 6e |ias @dat|abaselin|
|00001a60| 6b ff 00 03 06 68 6b 79 | 77 72 64 07 76 68 6b 79 |k....hky|wrd.vhky|
|00001a70| 77 72 64 07 77 68 6b 79 | 77 72 64 07 78 68 6b 79 |wrd.whky|wrd.xhky|
|00001a80| 77 72 64 07 79 68 6b 79 | 77 72 64 07 7a 68 6b 79 |wrd.yhky|wrd.zhky|
|00001a90| 77 72 64 07 7b 00 15 2d | 00 3c ff 00 04 06 18 ff |wrd.{..-|.<......|
|00001aa0| 00 05 06 53 45 4c 45 43 | 54 00 15 64 00 18 00 01 |...SELEC|T..d....|
|00001ab0| 00 00 05 f1 ff 00 05 06 | 44 45 4c 45 54 45 00 13 |........|DELETE..|
|00001ac0| 75 00 0c 00 02 00 00 05 | ab ff 00 05 04 75 73 65 |u.......|.....use|
|00001ad0| 72 00 1e 72 00 3b 00 02 | 00 00 05 a1 ff 00 05 0f |r..r.;..|........|
|00001ae0| 72 65 6d 6f 74 65 20 64 | 61 74 61 62 61 73 65 00 |remote d|atabase.|
|00001af0| 1a 73 00 04 00 06 00 00 | 06 55 ff 00 05 0b 53 45 |.s......|.U....SE|
|00001b00| 4c 45 43 54 20 6c 69 73 | 74 00 14 61 00 17 00 09 |LECT lis|t..a....|
|00001b10| 00 00 05 b5 ff 00 05 05 | 61 6c 69 61 73 00 09 01 |........|alias...|
|00001b20| 00 00 06 45 ff 00 03 01 | 00 09 01 00 00 06 49 ff |...E....|......I.|
|00001b30| 00 03 01 03 3c 00 16 00 | 17 54 68 65 20 57 48 45 |....<...|.The WHE|
|00001b40| 52 45 20 43 6c 61 75 73 | 65 20 69 6e 20 53 51 4c |RE Claus|e in SQL|
|00001b50| 02 68 63 6e 74 78 74 02 | 37 68 63 6e 74 78 74 02 |.hcntxt.|7hcntxt.|
|00001b60| 38 00 16 00 48 42 61 73 | 65 64 20 6f 6e 20 74 68 |8...HBas|ed on th|
|00001b70| 65 20 73 65 74 20 6f 66 | 20 63 6f 6e 64 69 74 69 |e set of| conditi|
|00001b80| 6f 6e 73 20 73 70 65 63 | 69 66 69 65 64 2c 20 74 |ons spec|ified, t|
|00001b90| 68 65 20 57 48 45 52 45 | 20 63 6c 61 75 73 65 20 |he WHERE| clause |
|00001ba0| 64 65 63 69 64 65 73 20 | 77 68 69 63 68 00 49 72 |decides |which.Ir|
|00001bb0| 6f 77 73 20 69 6e 20 61 | 20 74 61 62 6c 65 20 74 |ows in a| table t|
|00001bc0| 6f 20 53 45 4c 45 43 54 | 2c 20 55 50 44 41 54 45 |o SELECT|, UPDATE|
|00001bd0| 2c 20 6f 72 20 44 45 4c | 45 54 45 2e 20 20 54 68 |, or DEL|ETE. Th|
|00001be0| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 20 63 6f 6e 74 |e condit|ion cont|
|00001bf0| 61 69 6e 73 20 74 68 65 | 00 4a 6e 61 6d 65 20 6f |ains the|.Jname o|
|00001c00| 66 20 61 20 63 6f 6c 75 | 6d 6e 2c 20 61 20 63 6f |f a colu|mn, a co|
|00001c10| 6d 70 61 72 69 73 6f 6e | 20 6f 70 65 72 61 74 6f |mparison| operato|
|00001c20| 72 2c 20 61 6e 64 20 63 | 72 69 74 65 72 69 61 20 |r, and c|riteria |
|00001c30| 6f 66 20 74 68 65 20 73 | 61 6d 65 20 64 61 74 61 |of the s|ame data|
|00001c40| 74 79 70 65 00 49 61 73 | 20 74 68 65 20 63 6f 6c |type.Ias| the col|
|00001c50| 75 6d 6e 2e 20 20 59 6f | 75 20 6d 61 79 20 75 73 |umn. Yo|u may us|
|00001c60| 65 20 6c 6f 67 69 63 61 | 6c 20 6f 70 65 72 61 74 |e logica|l operat|
|00001c70| 6f 72 73 20 69 6e 20 61 | 20 63 6f 6e 64 69 74 69 |ors in a| conditi|
|00001c80| 6f 6e 20 61 73 20 77 65 | 6c 6c 2d 2d 4e 4f 54 00 |on as we|ll--NOT.|
|00001c90| 4b 72 65 76 65 72 73 65 | 73 20 74 68 65 20 6d 65 |Kreverse|s the me|
|00001ca0| 61 6e 69 6e 67 20 6f 66 | 20 74 68 65 20 63 72 69 |aning of| the cri|
|00001cb0| 74 65 72 69 61 3b 20 41 | 4e 44 20 72 65 71 75 69 |teria; A|ND requi|
|00001cc0| 72 65 73 20 74 68 61 74 | 20 73 65 76 65 72 61 6c |res that| several|
|00001cd0| 20 63 72 69 74 65 72 69 | 61 20 62 65 00 38 6d 65 | criteri|a be.8me|
|00001ce0| 74 3b 20 4f 52 20 70 69 | 63 6b 73 20 72 6f 77 73 |t; OR pi|cks rows|
|00001cf0| 20 74 68 61 74 20 6d 65 | 65 74 20 61 6e 79 20 6f | that me|et any o|
|00001d00| 6e 65 20 63 72 69 74 65 | 72 69 61 20 69 6e 20 61 |ne crite|ria in a|
|00001d10| 20 6c 69 73 74 2e ff 00 | 03 07 53 79 6e 74 61 78 | list...|..Syntax|
|00001d20| 3a ff 00 03 0e ff 20 04 | 53 45 4c 45 43 54 20 ff |:..... .|SELECT .|
|00001d30| 2e 03 00 16 ff 20 07 57 | 48 45 52 45 20 63 6f 6e |..... .W|HERE con|
|00001d40| 64 69 74 69 6f 6e ff 00 | 03 0e ff 20 04 55 50 44 |dition..|... .UPD|
|00001d50| 41 54 45 20 ff 2e 03 00 | 17 ff 20 08 57 48 45 52 |ATE ....|.. .WHER|
|00001d60| 45 20 63 6f 6e 64 69 74 | 69 6f 6e ff 00 03 0e ff |E condit|ion.....|
|00001d70| 20 04 44 45 4c 45 54 45 | 20 ff 2e 03 00 17 ff 20 | .DELETE| ...... |
|00001d80| 08 57 48 45 52 45 20 63 | 6f 6e 64 69 74 69 6f 6e |.WHERE c|ondition|
|00001d90| ff 00 03 4b 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |...KFor |example,|
|00001da0| 20 74 6f 20 66 69 6e 64 | 20 63 6c 69 65 6e 74 73 | to find| clients|
|00001db0| 20 77 68 6f 20 68 61 76 | 65 20 62 61 6c 61 6e 63 | who hav|e balanc|
|00001dc0| 65 73 20 6f 76 65 72 20 | 24 31 30 30 20 6f 76 65 |es over |$100 ove|
|00001dd0| 72 64 75 65 20 39 30 20 | 64 61 79 73 20 6f 72 00 |rdue 90 |days or.|
|00001de0| 05 6d 6f 72 65 3a ff 00 | 03 42 53 45 4c 45 43 54 |.more:..|.BSELECT|
|00001df0| 20 2a 20 46 52 4f 4d 20 | 63 6c 69 65 6e 74 73 20 | * FROM |clients |
|00001e00| 57 48 45 52 45 20 62 61 | 6c 20 3e 20 31 30 30 20 |WHERE ba|l > 100 |
|00001e10| 41 4e 44 20 53 59 53 44 | 41 54 45 20 2d 20 64 75 |AND SYSD|ATE - du|
|00001e20| 65 64 61 74 65 20 3e 3d | 20 39 30 3b ff 00 03 06 |edate >=| 90;....|
|00001e30| 68 6b 79 77 72 64 07 7c | 68 6b 79 77 72 64 07 7d |hkywrd.||hkywrd.}|
|00001e40| 68 6b 79 77 72 64 07 7e | 68 6b 79 77 72 64 07 7f |hkywrd.~|hkywrd..|
|00001e50| 68 6b 79 77 72 64 07 80 | 68 6b 79 77 72 64 07 81 |hkywrd..|hkywrd..|
|00001e60| 00 19 2d 00 14 ff 00 04 | 04 79 ff 00 05 0a 63 6f |..-.....|.y....co|
|00001e70| 6e 64 69 74 69 6f 6e 73 | 00 22 2d 00 14 00 02 00 |nditions|."-.....|
|00001e80| 00 04 9e ff 00 05 13 63 | 6f 6d 70 61 72 69 73 6f |.......c|ompariso|
|00001e90| 6e 20 6f 70 65 72 61 74 | 6f 72 00 20 6c 00 1c 00 |n operat|or. l...|
|00001ea0| 03 00 00 04 9f ff 00 05 | 11 6c 6f 67 69 63 61 6c |........|.logical|
|00001eb0| 20 6f 70 65 72 61 74 6f | 72 73 00 15 2d 00 04 00 | operato|rs..-...|
|00001ec0| 09 00 00 06 18 ff 00 05 | 06 53 45 4c 45 43 54 00 |........|.SELECT.|
|00001ed0| 15 75 00 04 00 0c 00 00 | 06 2f ff 00 05 06 55 50 |.u......|./....UP|
|00001ee0| 44 41 54 45 00 15 64 00 | 04 00 0f 00 00 05 f1 ff |DATE..d.|........|
|00001ef0| 00 05 06 44 45 4c 45 54 | 45 00 09 01 00 00 06 47 |...DELET|E......G|
|00001f00| ff 00 03 01 00 09 01 00 | 00 06 4b ff 00 03 01 05 |........|..K.....|
|00001f10| c1 00 31 00 26 54 68 65 | 20 47 52 4f 55 50 20 42 |..1.&The| GROUP B|
|00001f20| 59 20 61 6e 64 20 48 41 | 56 49 4e 47 20 43 6c 61 |Y and HA|VING Cla|
|00001f30| 75 73 65 73 20 69 6e 20 | 53 51 4c 02 68 63 6e 74 |uses in |SQL.hcnt|
|00001f40| 78 74 02 39 68 63 6e 74 | 78 74 02 3a 00 31 00 4b |xt.9hcnt|xt.:.1.K|
|00001f50| 57 69 74 68 20 74 68 65 | 20 47 52 4f 55 50 20 42 |With the| GROUP B|
|00001f60| 59 20 63 6c 61 75 73 65 | 2c 20 53 45 4c 45 43 54 |Y clause|, SELECT|
|00001f70| 20 63 6f 6d 70 75 74 65 | 73 20 6f 6e 65 20 73 75 | compute|s one su|
|00001f80| 6d 6d 61 72 79 20 72 6f | 77 20 66 6f 72 20 65 61 |mmary ro|w for ea|
|00001f90| 63 68 20 67 72 6f 75 70 | 20 6f 66 00 32 73 65 6c |ch group| of.2sel|
|00001fa0| 65 63 74 65 64 20 72 6f | 77 73 2e 20 20 45 76 65 |ected ro|ws. Eve|
|00001fb0| 72 79 20 53 45 4c 45 43 | 54 20 6c 69 73 74 20 65 |ry SELEC|T list e|
|00001fc0| 78 70 72 65 73 73 69 6f | 6e 20 6d 75 73 74 3a ff |xpressio|n must:.|
|00001fd0| 00 03 46 ff 20 07 2d 2d | ff 20 03 62 65 20 61 20 |..F. .--|. .be a |
|00001fe0| 66 75 6e 63 74 69 6f 6e | 20 6f 72 20 63 6f 6e 73 |function| or cons|
|00001ff0| 74 61 6e 74 20 77 69 74 | 68 20 6e 6f 20 70 61 72 |tant wit|h no par|
|00002000| 61 6d 65 74 65 72 2c 20 | 6c 69 6b 65 20 53 59 53 |ameter, |like SYS|
|00002010| 44 41 54 45 3b 00 3d ff | 20 07 2d 2d ff 20 03 63 |DATE;.=.| .--. .c|
|00002020| 6f 6e 74 61 69 6e 20 61 | 20 67 72 6f 75 70 20 66 |ontain a| group f|
|00002030| 75 6e 63 74 69 6f 6e 20 | 6c 69 6b 65 20 53 55 4d |unction |like SUM|
|00002040| 2c 20 43 4f 55 4e 54 2c | 20 6f 72 20 4d 41 58 3b |, COUNT,| or MAX;|
|00002050| 00 22 ff 20 07 2d 2d ff | 20 03 6d 61 74 63 68 20 |.". .--.| .match |
|00002060| 61 20 47 52 4f 55 50 20 | 42 59 20 65 78 70 72 2e |a GROUP |BY expr.|
|00002070| ff 00 03 4a 54 68 65 20 | 48 41 56 49 4e 47 20 63 |...JThe |HAVING c|
|00002080| 6f 6e 64 69 74 69 6f 6e | 20 73 70 65 63 69 66 69 |ondition| specifi|
|00002090| 65 73 20 77 68 69 63 68 | 20 47 52 4f 55 50 20 42 |es which| GROUP B|
|000020a0| 59 20 67 72 6f 75 70 73 | 20 61 70 70 65 61 72 20 |Y groups| appear |
|000020b0| 69 6e 20 74 68 65 20 72 | 65 73 75 6c 74 2e ff 00 |in the r|esult...|
|000020c0| 03 07 53 79 6e 74 61 78 | 3a ff 00 03 2a ff 20 03 |..Syntax|:...*. .|
|000020d0| 53 45 4c 45 43 54 20 6c | 69 73 74 ff 2e 03 20 28 |SELECT l|ist... (|
|000020e0| 6f 6e 6c 79 20 6f 6e 65 | 20 65 78 70 72 20 72 65 |only one| expr re|
|000020f0| 71 75 69 72 65 64 29 00 | 32 ff 20 05 46 52 4f 4d |quired).|2. .FROM|
|00002100| 20 74 61 62 6c 65 2c 20 | 74 61 62 6c 65 ff 2e 03 | table, |table...|
|00002110| 28 6f 6e 6c 79 20 6f 6e | 65 20 74 61 62 6c 65 20 |(only on|e table |
|00002120| 72 65 71 75 69 72 65 64 | 29 00 23 ff 20 05 57 48 |required|).#. .WH|
|00002130| 45 52 45 20 63 6f 6e 64 | 69 74 69 6f 6e 20 28 6e |ERE cond|ition (n|
|00002140| 6f 74 20 72 65 71 75 69 | 72 65 64 29 00 34 ff 20 |ot requi|red).4. |
|00002150| 05 47 52 4f 55 50 20 42 | 59 20 65 78 70 72 2c 20 |.GROUP B|Y expr, |
|00002160| 65 78 70 72 2c ff 2e 03 | 28 6f 6e 6c 79 20 6f 6e |expr,...|(only on|
|00002170| 65 20 65 78 70 72 20 72 | 65 71 75 69 72 65 64 29 |e expr r|equired)|
|00002180| 00 25 ff 20 05 48 41 56 | 49 4e 47 20 63 6f 6e 64 |.%. .HAV|ING cond|
|00002190| 69 74 69 6f 6e 20 28 6e | 6f 74 20 72 65 71 75 69 |ition (n|ot requi|
|000021a0| 72 65 64 20 29 ff 00 03 | 1f 45 78 61 6d 70 6c 65 |red )...|.Example|
|000021b0| 73 20 6f 66 20 47 52 4f | 55 50 20 42 59 20 61 6e |s of GRO|UP BY an|
|000021c0| 64 20 48 41 56 49 4e 47 | ff 00 03 4a 31 2e ff 20 |d HAVING|...J1.. |
|000021d0| 03 54 6f 20 64 69 73 70 | 6c 61 79 20 74 68 65 20 |.To disp|lay the |
|000021e0| 6d 69 6e 69 6d 75 6d 20 | 61 6e 64 20 6d 61 78 69 |minimum |and maxi|
|000021f0| 6d 75 6d 20 73 61 6c 61 | 72 69 65 73 20 6f 66 20 |mum sala|ries of |
|00002200| 63 6c 65 72 6b 73 20 66 | 6f 72 20 65 61 63 68 20 |clerks f|or each |
|00002210| 6f 66 20 74 68 65 00 22 | ff 20 05 64 65 70 61 72 |of the."|. .depar|
|00002220| 74 6d 65 6e 74 73 20 69 | 6e 20 74 68 65 20 65 6d |tments i|n the em|
|00002230| 70 20 74 61 62 6c 65 3a | ff 00 03 26 ff 20 05 53 |p table:|...&. .S|
|00002240| 45 4c 45 43 54 20 64 65 | 70 74 6e 6f 2c 20 4d 49 |ELECT de|ptno, MI|
|00002250| 4e 28 73 61 6c 29 2c 20 | 4d 41 58 28 73 61 6c 29 |N(sal), |MAX(sal)|
|00002260| 00 26 ff 20 0a 46 52 4f | 4d 20 65 6d 70 20 57 48 |.&. .FRO|M emp WH|
|00002270| 45 52 45 20 6a 6f 62 20 | 3d 20 27 43 4c 45 52 4b |ERE job |= 'CLERK|
|00002280| 27 00 1a ff 20 0a 47 52 | 4f 55 50 20 42 59 20 64 |'... .GR|OUP BY d|
|00002290| 65 70 74 6e 6f 3b ff 00 | 03 07 52 65 73 75 6c 74 |eptno;..|..Result|
|000022a0| 3a ff 00 03 1a 44 45 50 | 54 4e 4f 20 20 4d 49 4e |:....DEP|TNO MIN|
|000022b0| 28 53 41 4c 29 20 20 4d | 41 58 28 53 41 4c 29 00 |(SAL) M|AX(SAL).|
|000022c0| 19 ff 2d 19 00 16 31 30 | ff 20 06 31 33 30 30 ff |..-...10|. .1300.|
|000022d0| 20 06 31 33 30 30 00 16 | 32 30 ff 20 07 38 30 30 | .1300..|20. .800|
|000022e0| ff 20 06 31 31 30 30 00 | 16 33 30 ff 20 07 39 35 |. .1100.|.30. .95|
|000022f0| 30 ff 20 07 39 35 30 ff | 00 07 49 32 2e ff 20 03 |0. .950.|..I2.. .|
|00002300| 54 6f 20 6c 69 6d 69 74 | 20 74 68 65 20 71 75 65 |To limit| the que|
|00002310| 72 79 20 74 6f 20 64 65 | 70 61 72 74 6d 65 6e 74 |ry to de|partment|
|00002320| 73 20 77 68 6f 73 65 20 | 6c 6f 77 65 73 74 20 73 |s whose |lowest s|
|00002330| 61 6c 61 72 79 20 69 73 | 20 75 6e 64 65 72 20 31 |alary is| under 1|
|00002340| ff 30 03 3a ff 00 03 26 | ff 20 05 53 45 4c 45 43 |.0.:...&|. .SELEC|
|00002350| 54 20 64 65 70 74 6e 6f | 2c 20 4d 49 4e 28 73 61 |T deptno|, MIN(sa|
|00002360| 6c 29 2c 20 4d 41 58 28 | 73 61 6c 29 00 26 ff 20 |l), MAX(|sal).&. |
|00002370| 0a 46 52 4f 4d 20 65 6d | 70 20 57 48 45 52 45 20 |.FROM em|p WHERE |
|00002380| 6a 6f 62 20 3d 20 27 43 | 4c 45 52 4b 27 00 19 ff |job = 'C|LERK'...|
|00002390| 20 0a 47 52 4f 55 50 20 | 42 59 20 64 65 70 74 6e | .GROUP |BY deptn|
|000023a0| 6f 00 21 ff 20 0a 48 41 | 56 49 4e 47 20 4d 49 4e |o.!. .HA|VING MIN|
|000023b0| 28 73 61 6c 29 20 3c 20 | 31 ff 30 03 3b ff 00 03 |(sal) < |1.0.;...|
|000023c0| 07 52 65 73 75 6c 74 3a | ff 00 03 1a 44 45 50 54 |.Result:|....DEPT|
|000023d0| 4e 4f 20 20 4d 49 4e 28 | 53 41 4c 29 20 20 4d 41 |NO MIN(|SAL) MA|
|000023e0| 58 28 53 41 4c 29 00 1a | ff 2d 1a 00 16 32 30 ff |X(SAL)..|.-...20.|
|000023f0| 20 07 38 30 30 ff 20 06 | 31 31 30 30 00 16 33 30 | .800. .|1100..30|
|00002400| ff 20 07 39 35 30 ff 20 | 07 39 35 30 ff 00 03 06 |. .950. |.950....|
|00002410| 68 6b 79 77 72 64 07 82 | 68 6b 79 77 72 64 07 83 |hkywrd..|hkywrd..|
|00002420| 68 6b 79 77 72 64 07 84 | 68 6b 79 77 72 64 07 85 |hkywrd..|hkywrd..|
|00002430| 68 6b 79 77 72 64 07 86 | 68 6b 79 77 72 64 07 87 |hkywrd..|hkywrd..|
|00002440| 00 15 2d 00 1a ff 00 04 | 06 18 ff 00 05 06 53 45 |..-.....|......SE|
|00002450| 4c 45 43 54 00 1d 67 00 | 16 00 04 00 00 04 84 ff |LECT..g.|........|
|00002460| 00 05 0e 67 72 6f 75 70 | 20 66 75 6e 63 74 69 6f |...group| functio|
|00002470| 6e 00 1a 2d 00 03 00 0b | 00 00 06 55 ff 00 05 0b |n..-....|...U....|
|00002480| 53 45 4c 45 43 54 20 6c | 69 73 74 00 13 2d 00 1c |SELECT l|ist..-..|
|00002490| 00 0b 00 00 04 74 ff 00 | 05 04 65 78 70 72 00 18 |.....t..|..expr..|
|000024a0| 2d 00 0b 00 0d 00 00 04 | 79 ff 00 05 09 63 6f 6e |-.......|y....con|
|000024b0| 64 69 74 69 6f 6e 00 17 | 2d 00 0a 00 18 00 00 06 |dition..|-.......|
|000024c0| 49 ff 00 05 08 47 52 4f | 55 50 20 42 59 00 09 01 |I....GRO|UP BY...|
|000024d0| 00 00 06 49 ff 00 03 01 | 00 09 01 00 00 06 4d ff |...I....|......M.|
|000024e0| 00 03 01 05 95 00 29 00 | 2c 54 68 65 20 43 4f 4e |......).|,The CON|
|000024f0| 4e 45 43 54 20 42 59 20 | 61 6e 64 20 53 54 41 52 |NECT BY |and STAR|
|00002500| 54 20 57 49 54 48 20 43 | 6c 61 75 73 65 73 20 69 |T WITH C|lauses i|
|00002510| 6e 20 53 51 4c 02 68 63 | 6e 74 78 74 02 3b 68 63 |n SQL.hc|ntxt.;hc|
|00002520| 6e 74 78 74 02 3c 00 29 | 00 4b 54 68 65 20 43 4f |ntxt.<.)|.KThe CO|
|00002530| 4e 4e 45 43 54 20 42 59 | 20 63 6c 61 75 73 65 20 |NNECT BY| clause |
|00002540| 63 6f 6e 6e 65 63 74 73 | 20 72 6f 77 73 20 69 6e |connects| rows in|
|00002550| 20 61 20 74 72 65 65 2d | 73 74 72 75 63 74 75 72 | a tree-|structur|
|00002560| 65 64 20 68 69 65 72 61 | 72 63 68 79 2c 20 64 65 |ed hiera|rchy, de|
|00002570| 66 69 6e 65 64 00 37 62 | 79 20 50 52 49 4f 52 2e |fined.7b|y PRIOR.|
|00002580| 20 20 50 75 74 20 50 52 | 49 4f 52 20 69 6e 20 66 | Put PR|IOR in f|
|00002590| 72 6f 6e 74 20 6f 66 20 | 74 68 65 20 70 61 72 65 |ront of |the pare|
|000025a0| 6e 74 20 65 78 70 72 65 | 73 73 69 6f 6e 3a ff 00 |nt expre|ssion:..|
|000025b0| 03 23 ff 20 07 43 4f 4e | 4e 45 43 54 20 42 59 20 |.#. .CON|NECT BY |
|000025c0| 50 52 49 4f 52 20 45 4d | 50 4e 4f 20 3d 20 4d 47 |PRIOR EM|PNO = MG|
|000025d0| 52 ff 00 03 39 43 4f 4e | 4e 45 43 54 20 42 59 20 |R...9CON|NECT BY |
|000025e0| 63 61 6e 6e 6f 74 20 62 | 65 20 75 73 65 64 20 69 |cannot b|e used i|
|000025f0| 6e 20 73 75 62 71 75 65 | 72 79 20 6f 72 20 6a 6f |n subque|ry or jo|
|00002600| 69 6e 20 6f 70 65 72 61 | 74 69 6f 6e 73 2e ff 00 |in opera|tions...|
|00002610| 03 46 54 68 65 20 53 54 | 41 52 54 20 57 49 54 48 |.FThe ST|ART WITH|
|00002620| 20 63 6f 6e 64 69 74 69 | 6f 6e 20 73 70 65 63 69 | conditi|on speci|
|00002630| 66 69 65 73 20 77 68 69 | 63 68 20 72 6f 77 28 73 |fies whi|ch row(s|
|00002640| 29 20 61 72 65 20 74 68 | 65 20 72 6f 6f 74 28 73 |) are th|e root(s|
|00002650| 29 20 6f 66 20 74 68 65 | 00 47 74 72 65 65 2e 20 |) of the|.Gtree. |
|00002660| 20 54 6f 20 73 74 61 72 | 74 20 77 69 74 68 20 65 | To star|t with e|
|00002670| 61 63 68 20 72 6f 77 20 | 74 68 61 74 20 6d 65 65 |ach row |that mee|
|00002680| 74 73 20 74 68 65 20 57 | 48 45 52 45 20 63 6f 6e |ts the W|HERE con|
|00002690| 64 69 74 69 6f 6e 73 2c | 20 6f 6d 69 74 20 74 68 |ditions,| omit th|
|000026a0| 65 00 12 53 54 41 52 54 | 20 57 49 54 48 20 63 6c |e..START| WITH cl|
|000026b0| 61 75 73 65 2e ff 00 03 | 07 53 79 6e 74 61 78 3a |ause....|.Syntax:|
|000026c0| ff 00 03 18 ff 20 04 53 | 45 4c 45 43 54 20 6c 69 |..... .S|ELECT li|
|000026d0| 73 74 20 20 46 52 4f 4d | ff 2e 03 00 0f ff 20 07 |st FROM|...... .|
|000026e0| 57 48 45 52 45 ff 2e 03 | 00 44 ff 20 07 43 4f 4e |WHERE...|.D. .CON|
|000026f0| 4e 45 43 54 20 42 59 20 | 50 52 49 4f 52 20 65 78 |NECT BY |PRIOR ex|
|00002700| 70 72 31 20 6f 70 65 72 | 61 74 6f 72 20 65 78 70 |pr1 oper|ator exp|
|00002710| 72 32 20 20 28 64 69 73 | 70 6c 61 79 73 20 65 78 |r2 (dis|plays ex|
|00002720| 70 72 31 20 66 69 72 73 | 74 29 00 44 ff 20 07 43 |pr1 firs|t).D. .C|
|00002730| 4f 4e 4e 45 43 54 20 42 | 59 20 65 78 70 72 31 20 |ONNECT B|Y expr1 |
|00002740| 6f 70 65 72 61 74 6f 72 | 20 50 52 49 4f 52 20 65 |operator| PRIOR e|
|00002750| 78 70 72 32 20 20 28 64 | 69 73 70 6c 61 79 73 20 |xpr2 (d|isplays |
|00002760| 65 78 70 72 32 20 66 69 | 72 73 74 29 00 2b ff 20 |expr2 fi|rst).+. |
|00002770| 07 53 54 41 52 54 20 57 | 49 54 48 20 63 6f 6e 64 |.START W|ITH cond|
|00002780| 69 74 69 6f 6e 3b 20 28 | 6e 6f 74 20 72 65 71 75 |ition; (|not requ|
|00002790| 69 72 65 64 29 ff 00 03 | 27 45 78 61 6d 70 6c 65 |ired)...|'Example|
|000027a0| 20 6f 66 20 43 4f 4e 4e | 45 43 54 20 42 59 20 61 | of CONN|ECT BY a|
|000027b0| 6e 64 20 53 54 41 52 54 | 20 57 49 54 48 3c 74 3e |nd START| WITH<t>|
|000027c0| ff 00 03 44 54 6f 20 73 | 68 6f 77 20 61 6e 20 69 |...DTo s|how an i|
|000027d0| 6e 64 65 6e 74 65 64 20 | 6c 69 73 74 20 6f 66 20 |ndented |list of |
|000027e0| 65 6d 70 6c 6f 79 65 65 | 73 20 69 6e 20 6d 61 6e |employee|s in man|
|000027f0| 61 67 65 72 2f 65 6d 70 | 6c 6f 79 65 65 20 6f 72 |ager/emp|loyee or|
|00002800| 64 65 72 2c 20 75 73 65 | 00 18 74 72 65 65 2d 73 |der, use|..tree-s|
|00002810| 74 72 75 63 74 75 72 65 | 64 20 71 75 65 72 69 65 |tructure|d querie|
|00002820| 73 3a ff 00 03 44 ff 20 | 04 53 45 4c 45 43 54 20 |s:...D. |.SELECT |
|00002830| 4c 50 41 44 28 27 20 27 | 2c 20 32 2a 4c 45 56 45 |LPAD(' '|, 2*LEVE|
|00002840| 4c 29 7c 7c 65 6e 61 6d | 65 20 6f 72 67 61 6e 69 |L)||enam|e organi|
|00002850| 7a 61 74 69 6f 6e 2c 20 | 6c 65 76 65 6c 2c 20 65 |zation, |level, e|
|00002860| 6d 70 6e 6f 2c 20 6d 67 | 72 00 0f ff 20 07 46 52 |mpno, mg|r... .FR|
|00002870| 4f 4d 20 65 6d 70 00 3e | ff 20 07 43 4f 4e 4e 45 |OM emp.>|. .CONNE|
|00002880| 43 54 20 42 59 20 50 52 | 49 4f 52 20 65 6d 70 6e |CT BY PR|IOR empn|
|00002890| 6f 20 3d 20 6d 67 72 20 | 53 54 41 52 54 20 57 49 |o = mgr |START WI|
|000028a0| 54 48 20 65 6e 61 6d 65 | 20 3d 20 27 4b 49 4e 47 |TH ename| = 'KING|
|000028b0| 27 3b ff 00 03 07 52 65 | 73 75 6c 74 3a ff 00 03 |';....Re|sult:...|
|000028c0| 1e 4f 52 47 41 4e 49 5a | 41 54 49 4f 4e 20 4c 45 |.ORGANIZ|ATION LE|
|000028d0| 56 45 4c 20 45 4d 50 4e | 4f ff 20 03 4d 47 52 00 |VEL EMPN|O. .MGR.|
|000028e0| 1e ff 2d 1e 00 17 4b 49 | 4e 47 ff 20 0c 31 20 20 |..-...KI|NG. .1 |
|000028f0| 37 38 33 39 00 1d 4a 4f | 4e 45 53 ff 20 0b 32 20 |7839..JO|NES. .2 |
|00002900| 20 37 35 36 36 20 20 37 | 38 33 39 00 1d 53 43 4f | 7566 7|839..SCO|
|00002910| 54 54 ff 20 0b 33 20 20 | 37 37 38 38 20 20 37 35 |TT. .3 |7788 75|
|00002920| 36 36 00 1d 41 44 41 4d | 53 ff 20 0b 34 20 20 37 |66..ADAM|S. .4 7|
|00002930| 38 37 36 20 20 37 37 38 | 38 00 1d 46 4f 52 44 ff |876 778|8..FORD.|
|00002940| 20 0c 33 20 20 37 39 30 | 32 20 20 37 35 36 36 00 | .3 790|2 7566.|
|00002950| 1d 53 4d 49 54 48 ff 20 | 0b 34 20 20 37 33 36 39 |.SMITH. |.4 7369|
|00002960| 20 20 37 39 30 32 00 1d | 42 4c 41 4b 45 ff 20 0b | 7902..|BLAKE. .|
|00002970| 32 20 20 37 36 39 38 20 | 20 37 38 33 39 00 1d 41 |2 7698 | 7839..A|
|00002980| 4c 4c 45 4e ff 20 0b 33 | 20 20 37 34 39 39 20 20 |LLEN. .3| 7499 |
|00002990| 37 36 39 38 00 1d 57 41 | 52 44 ff 20 0c 33 20 20 |7698..WA|RD. .3 |
|000029a0| 37 35 32 31 20 20 37 36 | 39 38 ff 00 03 09 68 6b |7521 76|98....hk|
|000029b0| 79 77 72 64 07 88 68 6b | 79 77 72 64 07 89 68 6b |ywrd..hk|ywrd..hk|
|000029c0| 79 77 72 64 07 8a 68 6b | 79 77 72 64 07 8b 68 6b |ywrd..hk|ywrd..hk|
|000029d0| 79 77 72 64 07 8c 68 6b | 79 77 72 64 07 8d 68 6b |ywrd..hk|ywrd..hk|
|000029e0| 79 77 72 64 07 8e 68 6b | 79 77 72 64 07 8f 68 6b |ywrd..hk|ywrd..hk|
|000029f0| 79 77 72 64 07 90 00 28 | 74 00 29 ff 00 04 06 5f |ywrd...(|t.)...._|
|00002a00| ff 00 05 19 74 72 65 65 | 2d 73 74 72 75 63 74 75 |....tree|-structu|
|00002a10| 72 65 64 20 68 69 65 72 | 61 72 63 68 79 00 17 2d |red hier|archy..-|
|00002a20| 00 1d 00 05 00 00 06 5a | ff 00 05 08 73 75 62 71 |.......Z|....subq|
|00002a30| 75 65 72 79 00 13 6a 00 | 29 00 05 00 00 06 56 ff |uery..j.|).....V.|
|00002a40| 00 05 04 6a 6f 69 6e 00 | 14 77 00 2d 00 08 00 00 |...join.|.w.-....|
|00002a50| 06 47 ff 00 05 05 57 48 | 45 52 45 00 1a 2d 00 04 |.G....WH|ERE..-..|
|00002a60| 00 0d 00 00 06 55 ff 00 | 05 0b 53 45 4c 45 43 54 |.....U..|..SELECT|
|00002a70| 20 6c 69 73 74 00 14 2d | 00 12 00 0f 00 00 04 a4 | list..-|........|
|00002a80| ff 00 05 05 50 52 49 4f | 52 00 18 2d 00 12 00 11 |....PRIO|R..-....|
|00002a90| 00 00 04 79 ff 00 05 09 | 63 6f 6e 64 69 74 69 6f |...y....|conditio|
|00002aa0| 6e 00 26 2d ff 00 03 16 | 00 00 06 5f ff 00 05 17 |n.&-....|..._....|
|00002ab0| 74 72 65 65 2d 73 74 72 | 75 63 74 75 72 65 64 20 |tree-str|uctured |
|00002ac0| 71 75 65 72 69 65 73 00 | 19 2d 00 07 00 1a 00 00 |queries.|.-......|
|00002ad0| 06 4b ff 00 05 0a 43 4f | 4e 4e 45 43 54 20 42 59 |.K....CO|NNECT BY|
|00002ae0| 00 09 01 00 00 06 4b ff | 00 03 01 00 09 01 00 00 |......K.|........|
|00002af0| 06 4f ff 00 03 01 02 d3 | 00 0f 00 1a 54 68 65 20 |.O......|....The |
|00002b00| 4f 52 44 45 52 20 42 59 | 20 43 6c 61 75 73 65 20 |ORDER BY| Clause |
|00002b10| 69 6e 20 53 51 4c 02 68 | 63 6e 74 78 74 02 3d 68 |in SQL.h|cntxt.=h|
|00002b20| 63 6e 74 78 74 02 3e 00 | 0f 00 4a 54 68 65 20 4f |cntxt.>.|..JThe O|
|00002b30| 52 44 45 52 20 42 59 20 | 63 6c 61 75 73 65 20 73 |RDER BY |clause s|
|00002b40| 70 65 63 69 66 69 65 73 | 20 74 68 65 20 6f 72 64 |pecifies| the ord|
|00002b50| 65 72 20 69 6e 20 77 68 | 69 63 68 20 74 6f 20 64 |er in wh|ich to d|
|00002b60| 69 73 70 6c 61 79 20 74 | 68 65 20 72 65 73 75 6c |isplay t|he resul|
|00002b70| 74 73 20 6f 66 00 4a 61 | 20 71 75 65 72 79 2e 20 |ts of.Ja| query. |
|00002b80| 20 45 78 70 72 20 72 65 | 66 65 72 65 6e 63 65 73 | Expr re|ferences|
|00002b90| 20 6f 6e 65 20 6f 72 20 | 6d 6f 72 65 20 53 45 4c | one or |more SEL|
|00002ba0| 45 43 54 20 63 6c 61 75 | 73 65 20 63 6f 6c 75 6d |ECT clau|se colum|
|00002bb0| 6e 73 20 6f 72 20 46 52 | 4f 4d 20 63 6c 61 75 73 |ns or FR|OM claus|
|00002bc0| 65 00 45 74 61 62 6c 65 | 73 2e 20 20 50 6f 73 69 |e.Etable|s. Posi|
|00002bd0| 74 69 6f 6e 20 69 73 20 | 61 20 6e 75 6d 62 65 72 |tion is |a number|
|00002be0| 20 69 6e 64 69 63 61 74 | 69 6e 67 20 74 68 65 20 | indicat|ing the |
|00002bf0| 70 6c 61 63 65 20 6f 66 | 20 61 20 63 6f 6c 75 6d |place of| a colum|
|00002c00| 6e 20 69 6e 20 74 68 65 | 00 48 53 45 4c 45 43 54 |n in the|.HSELECT|
|00002c10| 20 63 6c 61 75 73 65 2e | 20 41 53 43 20 6f 72 20 | clause.| ASC or |
|00002c20| 44 45 53 43 20 73 70 65 | 63 69 66 79 20 61 73 63 |DESC spe|cify asc|
|00002c30| 65 6e 64 69 6e 67 20 6f | 72 20 64 65 73 63 65 6e |ending o|r descen|
|00002c40| 64 69 6e 67 20 6f 72 64 | 65 72 20 66 6f 72 20 74 |ding ord|er for t|
|00002c50| 68 65 00 19 73 6f 72 74 | 3b 20 74 68 65 20 64 65 |he..sort|; the de|
|00002c60| 66 61 75 6c 74 20 69 73 | 20 41 53 43 2e ff 00 03 |fault is| ASC....|
|00002c70| 07 53 79 6e 74 61 78 3a | ff 00 03 0e ff 20 04 53 |.Syntax:|..... .S|
|00002c80| 45 4c 45 43 54 20 ff 2e | 03 00 25 ff 20 08 4f 52 |ELECT ..|..%. .OR|
|00002c90| 44 45 52 20 42 59 20 65 | 78 70 72 20 41 53 43 2c |DER BY e|xpr ASC,|
|00002ca0| 20 28 6f 72 20 44 45 53 | 43 2c 29 00 29 ff 20 08 | (or DES|C,).). .|
|00002cb0| 4f 52 44 45 52 20 42 59 | 20 70 6f 73 69 74 69 6f |ORDER BY| positio|
|00002cc0| 6e 20 41 53 43 2c 20 28 | 6f 72 20 44 45 53 43 2c |n ASC, (|or DESC,|
|00002cd0| 29 ff 00 03 48 4f 52 44 | 45 52 20 42 59 20 63 61 |)...HORD|ER BY ca|
|00002ce0| 6e 6e 6f 74 20 62 65 20 | 75 73 65 64 20 69 6e 20 |nnot be |used in |
|00002cf0| 73 75 62 71 75 65 72 69 | 65 73 20 6f 66 20 49 4e |subqueri|es of IN|
|00002d00| 53 45 52 54 2c 20 55 50 | 44 41 54 45 2c 20 43 52 |SERT, UP|DATE, CR|
|00002d10| 45 41 54 45 20 54 41 42 | 4c 45 20 6f 72 00 46 43 |EATE TAB|LE or.FC|
|00002d20| 52 45 41 54 45 20 56 49 | 45 57 20 73 74 61 74 65 |REATE VI|EW state|
|00002d30| 6d 65 6e 74 73 2e 20 41 | 6e 20 4f 52 44 45 52 20 |ments. A|n ORDER |
|00002d40| 42 59 20 63 61 6e 63 65 | 6c 73 20 74 68 65 20 65 |BY cance|ls the e|
|00002d50| 66 66 65 63 74 20 6f 66 | 20 61 20 43 4f 4e 4e 45 |ffect of| a CONNE|
|00002d60| 43 54 20 42 59 00 1d 63 | 6c 61 75 73 65 20 69 6e |CT BY..c|lause in|
|00002d70| 20 74 68 65 20 73 61 6d | 65 20 73 74 61 74 65 6d | the sam|e statem|
|00002d80| 65 6e 74 2e ff 00 03 07 | 68 6b 79 77 72 64 07 91 |ent.....|hkywrd..|
|00002d90| 68 6b 79 77 72 64 07 92 | 68 6b 79 77 72 64 07 93 |hkywrd..|hkywrd..|
|00002da0| 68 6b 79 77 72 64 07 94 | 68 6b 79 77 72 64 07 95 |hkywrd..|hkywrd..|
|00002db0| 68 6b 79 77 72 64 07 96 | 68 6b 79 77 72 64 07 97 |hkywrd..|hkywrd..|
|00002dc0| 00 14 71 00 02 00 01 00 | 00 06 59 ff 00 05 05 71 |..q.....|..Y....q|
|00002dd0| 75 65 72 79 00 15 2d 00 | 04 00 08 00 00 06 18 ff |uery..-.|........|
|00002de0| 00 05 06 53 45 4c 45 43 | 54 00 19 2d 00 1b 00 0c |...SELEC|T..-....|
|00002df0| 00 00 06 5a ff 00 05 0a | 73 75 62 71 75 65 72 69 |...Z....|subqueri|
|00002e00| 65 73 00 15 2d 00 29 00 | 0c 00 00 06 01 ff 00 05 |es..-.).|........|
|00002e10| 06 49 4e 53 45 52 54 00 | 15 75 00 31 00 0c 00 00 |.INSERT.|.u.1....|
|00002e20| 06 2f ff 00 05 06 55 50 | 44 41 54 45 00 19 2d 00 |./....UP|DATE..-.|
|00002e30| 3c 00 0d 00 00 06 4b ff | 00 05 0a 43 4f 4e 4e 45 |<.....K.|...CONNE|
|00002e40| 43 54 20 42 59 00 18 2d | 00 13 00 0e 00 00 05 dc |CT BY..-|........|
|00002e50| ff 00 05 09 73 74 61 74 | 65 6d 65 6e 74 00 09 01 |....stat|ement...|
|00002e60| 00 00 06 4d ff 00 03 01 | 00 09 01 00 00 06 54 ff |...M....|......T.|
|00002e70| 00 03 01 02 ca 00 10 00 | 2b 54 68 65 20 46 4f 52 |........|+The FOR|
|00002e80| 20 55 50 44 41 54 45 20 | 4f 46 20 61 6e 64 20 4e | UPDATE |OF and N|
|00002e90| 4f 57 41 49 54 20 43 6c | 61 75 73 65 73 20 69 6e |OWAIT Cl|auses in|
|00002ea0| 20 53 51 4c 02 68 63 6e | 74 78 74 02 3f 68 63 6e | SQL.hcn|txt.?hcn|
|00002eb0| 74 78 74 02 40 00 10 00 | 43 46 4f 52 20 55 50 44 |txt.@...|CFOR UPD|
|00002ec0| 41 54 45 20 4f 46 20 6c | 6f 63 6b 73 20 74 68 65 |ATE OF l|ocks the|
|00002ed0| 20 73 65 6c 65 63 74 65 | 64 20 72 6f 77 73 20 6f | selecte|d rows o|
|00002ee0| 66 20 61 20 74 61 62 6c | 65 20 62 65 66 6f 72 65 |f a tabl|e before|
|00002ef0| 20 6f 6e 65 20 6f 72 20 | 6d 6f 72 65 00 48 55 50 | one or |more.HUP|
|00002f00| 44 41 54 45 ff 2e 03 57 | 48 45 52 45 20 73 74 61 |DATE...W|HERE sta|
|00002f10| 74 65 6d 65 6e 74 73 2e | 20 20 4f 74 68 65 72 20 |tements.| Other |
|00002f20| 75 73 65 72 73 20 63 61 | 6e 6e 6f 74 20 6c 6f 63 |users ca|nnot loc|
|00002f30| 6b 20 6f 72 20 75 70 64 | 61 74 65 20 74 68 6f 73 |k or upd|ate thos|
|00002f40| 65 20 72 6f 77 73 00 49 | 75 6e 74 69 6c 20 74 68 |e rows.I|until th|
|00002f50| 65 79 20 61 72 65 20 66 | 72 65 65 64 20 62 79 20 |ey are f|reed by |
|00002f60| 61 20 43 4f 4d 4d 49 54 | 20 6f 72 20 52 4f 4c 4c |a COMMIT| or ROLL|
|00002f70| 42 41 43 4b 2e 20 59 6f | 75 20 63 61 6e 20 61 6c |BACK. Yo|u can al|
|00002f80| 73 6f 20 75 73 65 20 46 | 4f 52 20 55 50 44 41 54 |so use F|OR UPDAT|
|00002f90| 45 00 1a 4f 46 20 77 69 | 74 68 20 49 4e 53 45 52 |E..OF wi|th INSER|
|00002fa0| 54 20 61 6e 64 20 44 45 | 4c 45 54 45 2e ff 00 03 |T and DE|LETE....|
|00002fb0| 07 53 79 6e 74 61 78 3a | ff 00 03 18 ff 20 04 53 |.Syntax:|..... .S|
|00002fc0| 45 4c 45 43 54 20 6c 69 | 73 74 20 20 46 52 4f 4d |ELECT li|st FROM|
|00002fd0| ff 2e 03 00 3f ff 20 07 | 46 4f 52 20 55 50 44 41 |....?. .|FOR UPDA|
|00002fe0| 54 45 20 4f 46 20 63 6f | 6c 75 6d 6e 2c 20 63 6f |TE OF co|lumn, co|
|00002ff0| 6c 75 6d 6e 2c ff 2e 03 | 28 6f 6e 65 20 63 6f 6c |lumn,...|(one col|
|00003000| 75 6d 6e 20 69 73 20 72 | 65 71 75 69 72 65 64 29 |umn is r|equired)|
|00003010| 00 0e ff 20 07 4e 4f 57 | 41 49 54 3b ff 00 03 49 |... .NOW|AIT;...I|
|00003020| 59 6f 75 20 63 61 6e 6e | 6f 74 20 75 73 65 20 46 |You cann|ot use F|
|00003030| 4f 52 20 55 50 44 41 54 | 45 20 4f 46 20 77 69 74 |OR UPDAT|E OF wit|
|00003040| 68 20 73 65 74 20 66 75 | 6e 63 74 69 6f 6e 73 2c |h set fu|nctions,|
|00003050| 20 6e 6f 72 20 77 69 74 | 68 20 44 49 53 54 49 4e | nor wit|h DISTIN|
|00003060| 43 54 2c 20 47 52 4f 55 | 50 00 26 42 59 2c 20 55 |CT, GROU|P.&BY, U|
|00003070| 4e 49 4f 4e 2c 20 49 4e | 54 45 52 53 45 43 54 20 |NION, IN|TERSECT |
|00003080| 6f 72 20 4d 49 4e 55 53 | 20 63 6c 61 75 73 65 73 |or MINUS| clauses|
|00003090| 2e ff 00 03 4a 4e 4f 57 | 41 49 54 20 6c 65 61 76 |....JNOW|AIT leav|
|000030a0| 65 73 20 74 68 65 20 73 | 74 61 74 65 6d 65 6e 74 |es the s|tatement|
|000030b0| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 77 61 69 74 | instead| of wait|
|000030c0| 69 6e 67 20 69 66 20 61 | 6e 79 20 72 6f 77 20 63 |ing if a|ny row c|
|000030d0| 61 6e 6e 6f 74 20 62 65 | 20 6c 6f 63 6b 65 64 00 |annot be| locked.|
|000030e0| 21 62 65 63 61 75 73 65 | 20 73 6f 6d 65 6f 6e 65 |!because| someone|
|000030f0| 20 65 6c 73 65 20 69 73 | 20 75 73 69 6e 67 20 69 | else is| using i|
|00003100| 74 2e ff 00 03 06 68 6b | 79 77 72 64 07 98 68 6b |t.....hk|ywrd..hk|
|00003110| 79 77 72 64 07 99 68 6b | 79 77 72 64 07 9a 68 6b |ywrd..hk|ywrd..hk|
|00003120| 79 77 72 64 07 9b 68 6b | 79 77 72 64 07 9c 68 6b |ywrd..hk|ywrd..hk|
|00003130| 79 77 72 64 07 9d 00 15 | 75 ff 00 03 01 00 00 06 |ywrd....|u.......|
|00003140| 2f ff 00 05 06 55 50 44 | 41 54 45 00 15 2d 00 1a |/....UPD|ATE..-..|
|00003150| 00 02 00 00 05 eb ff 00 | 05 06 43 4f 4d 4d 49 54 |........|..COMMIT|
|00003160| 00 17 72 00 24 00 02 00 | 00 06 15 ff 00 05 08 52 |..r.$...|.......R|
|00003170| 4f 4c 4c 42 41 43 4b 00 | 15 2d 00 08 00 03 00 00 |OLLBACK.|.-......|
|00003180| 06 01 ff 00 05 06 49 4e | 53 45 52 54 00 15 64 00 |......IN|SERT..d.|
|00003190| 13 00 03 00 00 05 f1 ff | 00 05 06 44 45 4c 45 54 |........|...DELET|
|000031a0| 45 00 1a 2d 00 04 00 07 | 00 00 06 55 ff 00 05 0b |E..-....|...U....|
|000031b0| 53 45 4c 45 43 54 20 6c | 69 73 74 00 09 01 00 00 |SELECT l|ist.....|
|000031c0| 06 4f ff 00 03 01 00 09 | 01 00 00 06 55 ff 00 03 |.O......|....U...|
|000031d0| 01 02 69 00 0e 00 1c 55 | 73 65 73 20 6f 66 20 74 |..i....U|ses of t|
|000031e0| 68 65 20 53 45 4c 45 43 | 54 20 53 74 61 74 65 6d |he SELEC|T Statem|
|000031f0| 65 6e 74 02 68 63 6e 74 | 78 74 02 41 68 63 6e 74 |ent.hcnt|xt.Ahcnt|
|00003200| 78 74 02 42 00 0e 00 49 | 54 68 65 20 53 45 4c 45 |xt.B...I|The SELE|
|00003210| 43 54 20 73 74 61 74 65 | 6d 65 6e 74 20 73 68 6f |CT state|ment sho|
|00003220| 77 73 20 74 68 65 20 73 | 79 6e 74 61 78 20 6f 66 |ws the s|yntax of|
|00003230| 20 63 6c 61 75 73 65 73 | 20 75 73 65 64 20 69 6e | clauses| used in|
|00003240| 20 53 45 4c 45 43 54 20 | 61 6e 64 20 6f 74 68 65 | SELECT |and othe|
|00003250| 72 00 49 53 51 4c 20 73 | 74 61 74 65 6d 65 6e 74 |r.ISQL s|tatement|
|00003260| 73 2e 20 20 54 68 65 20 | 74 6f 70 69 63 73 20 62 |s. The |topics b|
|00003270| 65 6c 6f 77 20 70 72 6f | 76 69 64 65 20 69 6e 66 |elow pro|vide inf|
|00003280| 6f 72 6d 61 74 69 6f 6e | 20 6f 6e 20 73 6f 6d 65 |ormation| on some|
|00003290| 20 6f 66 20 74 68 65 20 | 6d 61 6e 79 00 1d 75 73 | of the |many..us|
|000032a0| 65 73 20 6f 66 20 74 68 | 65 20 53 45 4c 45 43 54 |es of th|e SELECT|
|000032b0| 20 73 74 61 74 65 6d 65 | 6e 74 3a ff 00 03 1f ff | stateme|nt:.....|
|000032c0| 20 05 2d 2d ff 20 03 43 | 6f 72 72 65 6c 61 74 65 | .--. .C|orrelate|
|000032d0| 64 20 53 75 62 71 75 65 | 72 69 65 73 00 15 ff 20 |d Subque|ries... |
|000032e0| 05 2d 2d ff 20 03 53 45 | 4c 45 43 54 20 4c 69 73 |.--. .SE|LECT Lis|
|000032f0| 74 00 1d ff 20 05 2d 2d | ff 20 03 44 69 73 74 72 |t... .--|. .Distr|
|00003300| 69 62 75 74 65 64 20 51 | 75 65 72 69 65 73 00 18 |ibuted Q|ueries..|
|00003310| ff 20 05 2d 2d ff 20 03 | 4a 6f 69 6e 73 20 28 73 |. .--. .|Joins (s|
|00003320| 69 6d 70 6c 65 29 00 23 | ff 20 05 2d 2d ff 20 03 |imple).#|. .--. .|
|00003330| 4d 61 6e 61 67 69 6e 67 | 20 43 75 72 73 6f 72 73 |Managing| Cursors|
|00003340| 20 28 50 4c 2f 53 51 4c | 29 00 15 ff 20 05 2d 2d | (PL/SQL|)... .--|
|00003350| ff 20 03 4f 75 74 65 72 | 20 4a 6f 69 6e 73 00 11 |. .Outer| Joins..|
|00003360| ff 20 05 2d 2d ff 20 03 | 51 75 65 72 69 65 73 00 |. .--. .|Queries.|
|00003370| ff 20 06 2d 2d ff 20 03 | 53 45 4c 45 43 54 ff 2e |. .--. .|SELECT..|
|00003380| 03 49 4e 54 4f 20 28 50 | 4c 2f 53 51 4c 29 00 14 |.INTO (P|L/SQL)..|
|00003390| ff 20 05 2d 2d ff 20 03 | 53 75 62 71 75 65 72 69 |. .--. .|Subqueri|
|000033a0| 65 73 00 21 ff 20 05 2d | 2d ff 20 03 54 72 65 65 |es.!. .-|-. .Tree|
|000033b0| 2d 53 74 72 75 63 74 75 | 72 65 64 20 51 75 65 72 |-Structu|red Quer|
|000033c0| 69 65 73 ff 00 03 0c 68 | 6b 79 77 72 64 07 9e 68 |ies....h|kywrd..h|
|000033d0| 6b 79 77 72 64 07 9f 68 | 6b 79 77 72 64 07 a0 68 |kywrd..h|kywrd..h|
|000033e0| 6b 79 77 72 64 07 a1 68 | 6b 79 77 72 64 07 a2 68 |kywrd..h|kywrd..h|
|000033f0| 6b 79 77 72 64 07 a3 68 | 6b 79 77 72 64 07 a4 68 |kywrd..h|kywrd..h|
|00003400| 6b 79 77 72 64 07 a5 68 | 6b 79 77 72 64 07 a6 68 |kywrd..h|kywrd..h|
|00003410| 6b 79 77 72 64 07 a7 68 | 6b 79 77 72 64 07 a8 68 |kywrd..h|kywrd..h|
|00003420| 6b 79 77 72 64 07 a9 00 | 12 73 ff 00 03 01 00 00 |kywrd...|.s......|
|00003430| 03 e8 ff 00 05 03 53 51 | 4c 00 1f 2d 00 04 ff 00 |......SQ|L..-....|
|00003440| 04 06 18 ff 00 05 10 53 | 45 4c 45 43 54 20 73 74 |.......S|ELECT st|
|00003450| 61 74 65 6d 65 6e 74 00 | 24 2d 00 0a 00 04 00 00 |atement.|$-......|
|00003460| 06 5b ff 00 05 15 43 6f | 72 72 65 6c 61 74 65 64 |.[....Co|rrelated|
|00003470| 20 53 75 62 71 75 65 72 | 69 65 73 00 1a 2d 00 0a | Subquer|ies..-..|
|00003480| 00 05 00 00 06 55 ff 00 | 05 0b 53 45 4c 45 43 54 |.....U..|..SELECT|
|00003490| 20 4c 69 73 74 00 22 64 | 00 0a 00 06 00 00 06 5c | List."d|.......\|
|000034a0| ff 00 03 66 21 ff 00 00 | 13 44 69 73 74 72 69 62 |...f!...|.Distrib|
|000034b0| 75 74 65 64 20 51 75 65 | 72 69 65 73 00 14 6a 00 |uted Que|ries..j.|
|000034c0| 0a 00 07 00 00 06 56 ff | 00 05 05 4a 6f 69 6e 73 |......V.|...Joins|
|000034d0| 00 1f 6d 00 0a 00 08 00 | 00 04 c4 ff 00 05 10 4d |..m.....|.......M|
|000034e0| 61 6e 61 67 69 6e 67 20 | 43 75 72 73 6f 72 73 00 |anaging |Cursors.|
|000034f0| 1a 6f 00 0a 00 09 00 00 | 06 57 ff 00 05 0b 4f 75 |.o......|.W....Ou|
|00003500| 74 65 72 20 4a 6f 69 6e | 73 00 16 71 00 0a 00 0a |ter Join|s..q....|
|00003510| 00 00 06 59 ff 00 05 07 | 51 75 65 72 69 65 73 00 |...Y....|Queries.|
|00003520| 1c 2d 00 0a 00 0b 00 00 | 06 2b ff 00 05 0d 53 45 |.-......|.+....SE|
|00003530| 4c 45 43 54 ff 2e 03 49 | 4e 54 4f 00 19 2d 00 0a |LECT...I|NTO..-..|
|00003540| 00 0c 00 00 06 5a ff 00 | 05 0a 53 75 62 71 75 65 |.....Z..|..Subque|
|00003550| 72 69 65 73 00 26 74 00 | 0a 00 0d 00 00 06 5f ff |ries.&t.|......_.|
|00003560| 00 05 17 54 72 65 65 2d | 53 74 72 75 63 74 75 72 |...Tree-|Structur|
|00003570| 65 64 20 51 75 65 72 69 | 65 73 00 09 01 00 00 06 |ed Queri|es......|
|00003580| 54 ff 00 03 01 00 09 01 | 00 00 06 56 ff 00 03 01 |T.......|...V....|
|00003590| 05 14 00 27 00 0f 54 68 | 65 20 53 45 4c 45 43 54 |...'..Th|e SELECT|
|000035a0| 20 4c 69 73 74 02 68 63 | 6e 74 78 74 02 43 68 63 | List.hc|ntxt.Chc|
|000035b0| 6e 74 78 74 02 44 00 27 | 00 49 54 68 65 20 53 45 |ntxt.D.'|.IThe SE|
|000035c0| 4c 45 43 54 20 6c 69 73 | 74 20 69 73 20 6f 6e 65 |LECT lis|t is one|
|000035d0| 20 6f 72 20 6d 6f 72 65 | 20 69 74 65 6d 73 20 6f | or more| items o|
|000035e0| 66 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2c 20 73 |f inform|ation, s|
|000035f0| 65 70 61 72 61 74 65 64 | 20 62 79 20 63 6f 6d 6d |eparated| by comm|
|00003600| 61 73 2c 00 45 62 65 74 | 77 65 65 6e 20 74 68 65 |as,.Ebet|ween the|
|00003610| 20 77 6f 72 64 20 53 45 | 4c 45 43 54 20 61 6e 64 | word SE|LECT and|
|00003620| 20 74 68 65 20 46 52 4f | 4d 20 63 6c 61 75 73 65 | the FRO|M clause|
|00003630| 2e 20 54 68 65 20 6f 72 | 64 65 72 20 6f 66 20 53 |. The or|der of S|
|00003640| 45 4c 45 43 54 20 6c 69 | 73 74 00 4b 65 6e 74 72 |ELECT li|st.Kentr|
|00003650| 69 65 73 20 64 65 74 65 | 72 6d 69 6e 65 73 20 74 |ies dete|rmines t|
|00003660| 68 65 20 6f 72 64 65 72 | 20 6f 66 20 63 6f 6c 75 |he order| of colu|
|00003670| 6d 6e 73 20 69 6e 20 74 | 68 65 20 72 65 73 75 6c |mns in t|he resul|
|00003680| 74 2e 20 20 54 68 65 20 | 53 45 4c 45 43 54 20 6c |t. The |SELECT l|
|00003690| 69 73 74 20 6d 61 79 00 | 08 63 6f 6e 74 61 69 6e |ist may.|.contain|
|000036a0| 3a ff 00 03 42 ff 20 08 | 2d 2d 20 20 43 6f 6c 75 |:...B. .|-- Colu|
|000036b0| 6d 6e 20 6e 61 6d 65 73 | 20 61 6e 64 20 74 68 65 |mn names| and the|
|000036c0| 69 72 20 61 6c 69 61 73 | 65 73 3a 20 65 6e 61 6d |ir alias|es: enam|
|000036d0| 65 20 65 6d 70 6c 6f 79 | 65 65 2c 20 64 65 70 74 |e employ|ee, dept|
|000036e0| 6e 6f 00 44 ff 20 08 2d | 2d 20 20 45 78 70 72 65 |no.D. .-|- Expre|
|000036f0| 73 73 69 6f 6e 73 20 69 | 6e 20 63 6f 6c 75 6d 6e |ssions i|n column|
|00003700| 73 20 61 6e 64 20 63 6f | 6e 73 74 72 61 69 6e 74 |s and co|nstraint|
|00003710| 73 20 6f 72 20 68 6f 73 | 74 20 76 61 72 69 61 62 |s or hos|t variab|
|00003720| 6c 65 73 00 30 ff 20 08 | 2d 2d 20 20 47 72 6f 75 |les.0. .|-- Grou|
|00003730| 70 20 66 75 6e 63 74 69 | 6f 6e 73 3a 20 4d 41 58 |p functi|ons: MAX|
|00003740| 28 73 61 6c 29 2c 20 4d | 49 4e 28 63 6f 6d 6d 29 |(sal), M|IN(comm)|
|00003750| 00 38 ff 20 08 2d 2d 20 | 20 4e 6f 6e 2d 67 72 6f |.8. .-- | Non-gro|
|00003760| 75 70 20 66 75 6e 63 74 | 69 6f 6e 73 3a 20 53 59 |up funct|ions: SY|
|00003770| 53 44 41 54 45 2c 20 49 | 4e 49 54 43 41 50 28 65 |SDATE, I|NITCAP(e|
|00003780| 6e 61 6d 65 29 ff 00 03 | 07 53 79 6e 74 61 78 3a |name)...|.Syntax:|
|00003790| ff 00 03 0f ff 20 04 53 | 45 4c 45 43 54 20 6c 69 |..... .S|ELECT li|
|000037a0| 73 74 00 0d ff 20 06 46 | 52 4f 4d ff 2e 03 ff 00 |st... .F|ROM.....|
|000037b0| 03 46 49 66 20 74 68 65 | 20 47 52 4f 55 50 20 42 |.FIf the| GROUP B|
|000037c0| 59 20 63 6c 61 75 73 65 | 20 69 73 20 75 73 65 64 |Y clause| is used|
|000037d0| 2c 20 74 68 65 20 53 45 | 4c 45 43 54 20 6c 69 73 |, the SE|LECT lis|
|000037e0| 74 20 6d 61 79 20 63 6f | 6e 74 61 69 6e 20 6f 6e |t may co|ntain on|
|000037f0| 6c 79 20 67 72 6f 75 70 | 00 4b 66 75 6e 63 74 69 |ly group|.Kfuncti|
|00003800| 6f 6e 73 2c 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |ons, exp|ressions|
|00003810| 20 61 6c 73 6f 20 6c 69 | 73 74 65 64 20 69 6e 20 | also li|sted in |
|00003820| 74 68 65 20 47 52 4f 55 | 50 20 42 59 20 63 6c 61 |the GROU|P BY cla|
|00003830| 75 73 65 2c 20 61 6e 64 | 20 63 6f 6e 73 74 61 6e |use, and| constan|
|00003840| 74 73 20 6f 72 00 2f 66 | 75 6e 63 74 69 6f 6e 73 |ts or./f|unctions|
|00003850| 20 77 69 74 68 6f 75 74 | 20 70 61 72 61 6d 65 74 | without| paramet|
|00003860| 65 72 73 20 28 73 75 63 | 68 20 61 73 20 53 59 53 |ers (suc|h as SYS|
|00003870| 44 41 54 45 29 2e ff 00 | 03 08 45 78 61 6d 70 6c |DATE)...|..Exampl|
|00003880| 65 73 ff 00 03 1e 54 68 | 65 20 53 45 4c 45 43 54 |es....Th|e SELECT|
|00003890| 20 6c 69 73 74 20 6d 61 | 79 20 63 6f 6e 74 61 69 | list ma|y contai|
|000038a0| 6e ff 2e 03 ff 00 03 23 | ff 20 05 2d 2d ff 20 03 |n......#|. .--. .|
|000038b0| 43 6f 6c 75 6d 6e 20 6e | 61 6d 65 73 20 61 6e 64 |Column n|ames and|
|000038c0| 20 61 6c 69 61 73 65 73 | 3a ff 00 03 23 53 45 4c | aliases|:...#SEL|
|000038d0| 45 43 54 20 65 6e 61 6d | 65 2c 20 64 65 70 74 6e |ECT enam|e, deptn|
|000038e0| 6f 20 6e 6f 2c 20 64 6e | 61 6d 65 20 64 65 70 74 |o no, dn|ame dept|
|000038f0| 00 17 ff 20 0c 46 52 4f | 4d 20 65 6d 70 ff 2e 03 |... .FRO|M emp...|
|00003900| ff 00 03 1a ff 20 05 2d | 2d ff 20 03 47 72 6f 75 |..... .-|-. .Grou|
|00003910| 70 20 66 75 6e 63 74 69 | 6f 6e 73 3a ff 00 03 28 |p functi|ons:...(|
|00003920| ff 20 0d 53 45 4c 45 43 | 54 20 31 32 20 2a 20 41 |. .SELEC|T 12 * A|
|00003930| 56 47 28 73 61 6c 20 2b | 20 63 6f 6d 6d 29 00 18 |VG(sal +| comm)..|
|00003940| ff 20 10 46 52 4f 4d 20 | 65 6d 70 00 26 ff 20 10 |. .FROM |emp.&. .|
|00003950| 57 48 45 52 45 20 6a 6f | 62 20 3d 20 27 53 41 4c |WHERE jo|b = 'SAL|
|00003960| 45 53 4d 41 4e 27 ff 00 | 03 1e ff 20 05 2d 2d ff |ESMAN'..|... .--.|
|00003970| 20 03 4e 6f 6e 2d 47 72 | 6f 75 70 20 66 75 6e 63 | .Non-Gr|oup func|
|00003980| 74 69 6f 6e 73 3a ff 00 | 03 2d ff 20 0c 53 45 4c |tions:..|.-. .SEL|
|00003990| 45 43 54 20 54 4f 5f 43 | 48 41 52 28 68 69 72 65 |ECT TO_C|HAR(hire|
|000039a0| 64 61 74 65 2c 20 27 ff | 59 04 27 29 2c 00 23 ff |date, '.|Y.'),.#.|
|000039b0| 20 10 49 4e 49 54 43 41 | 50 28 65 6e 61 6d 65 29 | .INITCA|P(ename)|
|000039c0| 2c 20 73 61 6c 00 19 ff | 20 0e 46 52 4f 4d 20 65 |, sal...| .FROM e|
|000039d0| 6d 70 ff 2e 03 ff 00 03 | 0c 68 6b 79 77 72 64 07 |mp......|.hkywrd.|
|000039e0| aa 68 6b 79 77 72 64 07 | ab 68 6b 79 77 72 64 07 |.hkywrd.|.hkywrd.|
|000039f0| ac 68 6b 79 77 72 64 07 | ad 68 6b 79 77 72 64 07 |.hkywrd.|.hkywrd.|
|00003a00| ae 68 6b 79 77 72 64 07 | af 68 6b 79 77 72 64 07 |.hkywrd.|.hkywrd.|
|00003a10| b0 68 6b 79 77 72 64 07 | b1 68 6b 79 77 72 64 07 |.hkywrd.|.hkywrd.|
|00003a20| b2 68 6b 79 77 72 64 07 | b3 68 6b 79 77 72 64 07 |.hkywrd.|.hkywrd.|
|00003a30| b4 68 6b 79 77 72 64 07 | b5 00 15 2d 00 11 00 01 |.hkywrd.|...-....|
|00003a40| 00 00 06 18 ff 00 05 06 | 53 45 4c 45 43 54 00 13 |........|SELECT..|
|00003a50| 66 00 20 00 01 00 00 06 | 45 ff 00 05 04 46 52 4f |f. .....|E....FRO|
|00003a60| 4d 00 16 61 00 23 00 05 | 00 00 05 b5 ff 00 05 07 |M..a.#..|........|
|00003a70| 61 6c 69 61 73 65 73 00 | 1a 2d 00 0c 00 06 00 00 |aliases.|.-......|
|00003a80| 04 74 ff 00 05 0b 45 78 | 70 72 65 73 73 69 6f 6e |.t....Ex|pression|
|00003a90| 73 00 1e 2d 00 0c 00 07 | 00 00 04 84 ff 00 05 0f |s..-....|........|
|00003aa0| 47 72 6f 75 70 20 66 75 | 6e 63 74 69 6f 6e 73 00 |Group fu|nctions.|
|00003ab0| 18 66 00 16 00 08 00 00 | 04 7e ff 00 05 09 66 75 |.f......|.~....fu|
|00003ac0| 6e 63 74 69 6f 6e 73 00 | 17 67 00 07 00 0f 00 00 |nctions.|.g......|
|00003ad0| 06 49 ff 00 05 08 47 52 | 4f 55 50 20 42 59 00 1a |.I....GR|OUP BY..|
|00003ae0| 2d 00 04 00 15 00 00 06 | 55 ff 00 05 0b 53 45 4c |-.......|U....SEL|
|00003af0| 45 43 54 20 6c 69 73 74 | 00 16 61 00 1b 00 17 00 |ECT list|..a.....|
|00003b00| 00 05 b5 ff 00 05 07 61 | 6c 69 61 73 65 73 00 15 |.......a|liases..|
|00003b10| 2d ff 00 03 19 00 00 06 | 18 ff 00 05 06 53 45 4c |-.......|.....SEL|
|00003b20| 45 43 54 00 1e 2d 00 0a | 00 1c 00 00 04 84 ff 00 |ECT..-..|........|
|00003b30| 05 0f 47 72 6f 75 70 20 | 66 75 6e 63 74 69 6f 6e |..Group |function|
|00003b40| 73 00 18 66 00 14 00 22 | 00 00 04 7e ff 00 05 09 |s..f..."|...~....|
|00003b50| 66 75 6e 63 74 69 6f 6e | 73 00 09 01 00 00 06 55 |function|s......U|
|00003b60| ff 00 03 01 00 09 01 00 | 00 06 57 ff 00 03 01 06 |........|..W.....|
|00003b70| 5c 00 33 00 05 4a 6f 69 | 6e 73 02 68 63 6e 74 78 |\.3..Joi|ns.hcntx|
|00003b80| 74 02 45 68 63 6e 74 78 | 74 02 46 00 33 00 49 41 |t.Ehcntx|t.F.3.IA|
|00003b90| 20 6a 6f 69 6e 20 63 6f | 6d 62 69 6e 65 73 20 72 | join co|mbines r|
|00003ba0| 6f 77 73 20 66 72 6f 6d | 20 74 77 6f 20 6f 72 20 |ows from| two or |
|00003bb0| 6d 6f 72 65 20 74 61 62 | 6c 65 73 3b 20 69 6e 20 |more tab|les; in |
|00003bc0| 74 68 65 20 72 65 73 75 | 6c 74 2c 20 65 61 63 68 |the resu|lt, each|
|00003bd0| 20 72 6f 77 20 68 61 73 | 00 46 64 61 74 61 20 66 | row has|.Fdata f|
|00003be0| 72 6f 6d 20 73 65 76 65 | 72 61 6c 20 74 61 62 6c |rom seve|ral tabl|
|00003bf0| 65 73 2e 20 20 54 68 65 | 20 57 48 45 52 45 20 63 |es. The| WHERE c|
|00003c00| 6c 61 75 73 65 20 73 70 | 65 63 69 66 69 65 73 20 |lause sp|ecifies |
|00003c10| 68 6f 77 20 74 68 65 20 | 72 6f 77 73 20 61 72 65 |how the |rows are|
|00003c20| 00 09 63 6f 6d 62 69 6e | 65 64 2e ff 00 03 47 41 |..combin|ed....GA|
|00003c30| 20 73 69 6d 70 6c 65 20 | 6a 6f 69 6e 20 72 65 74 | simple |join ret|
|00003c40| 75 72 6e 73 20 72 6f 77 | 73 20 66 72 6f 6d 20 74 |urns row|s from t|
|00003c50| 77 6f 20 74 61 62 6c 65 | 73 3b 20 74 68 65 20 72 |wo table|s; the r|
|00003c60| 6f 77 73 20 72 65 74 75 | 72 6e 65 64 20 61 72 65 |ows retu|rned are|
|00003c70| 20 74 68 6f 73 65 00 49 | 77 69 74 68 20 6d 61 74 | those.I|with mat|
|00003c80| 63 68 69 6e 67 20 76 61 | 6c 75 65 73 20 69 6e 20 |ching va|lues in |
|00003c90| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 63 6f |the spec|ified co|
|00003ca0| 6c 75 6d 6e 20 6f 66 20 | 65 61 63 68 20 74 61 62 |lumn of |each tab|
|00003cb0| 6c 65 2e 20 20 49 66 20 | 74 68 65 20 57 48 45 52 |le. If |the WHER|
|00003cc0| 45 00 4b 63 6c 61 75 73 | 65 20 69 73 20 6f 6d 69 |E.Kclaus|e is omi|
|00003cd0| 74 74 65 64 2c 20 61 6c | 6c 20 72 6f 77 73 20 66 |tted, al|l rows f|
|00003ce0| 72 6f 6d 20 61 6c 6c 20 | 74 61 62 6c 65 73 20 63 |rom all |tables c|
|00003cf0| 6f 6d 62 69 6e 65 3b 20 | 32 20 74 61 62 6c 65 73 |ombine; |2 tables|
|00003d00| 20 33 30 30 20 72 6f 77 | 73 20 65 61 63 68 00 2a | 300 row|s each.*|
|00003d10| 72 65 74 75 72 6e 73 20 | 39 30 2c ff 30 03 20 72 |returns |90,.0. r|
|00003d20| 6f 77 73 2d 2d 72 61 72 | 65 6c 79 20 77 68 61 74 |ows--rar|ely what|
|00003d30| 20 79 6f 75 20 77 61 6e | 74 2e ff 00 03 48 49 66 | you wan|t....HIf|
|00003d40| 20 79 6f 75 20 73 65 6c | 65 63 74 20 61 20 63 6f | you sel|ect a co|
|00003d50| 6c 75 6d 6e 20 74 68 61 | 74 20 65 78 69 73 74 73 |lumn tha|t exists|
|00003d60| 20 69 6e 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e | in more| than on|
|00003d70| 65 20 6f 66 20 74 68 65 | 20 74 61 62 6c 65 73 20 |e of the| tables |
|00003d80| 69 6e 20 74 68 65 00 3a | 6a 6f 69 6e 2c 20 70 72 |in the.:|join, pr|
|00003d90| 65 66 69 78 20 74 68 65 | 20 63 6f 6c 75 6d 6e 20 |efix the| column |
|00003da0| 6e 61 6d 65 20 77 69 74 | 68 20 74 68 65 20 74 61 |name wit|h the ta|
|00003db0| 62 6c 65 20 6e 61 6d 65 | 3a 20 65 6d 70 2e 73 61 |ble name|: emp.sa|
|00003dc0| 6c 2e ff 00 03 07 53 79 | 6e 74 61 78 3a ff 00 03 |l.....Sy|ntax:...|
|00003dd0| 35 ff 20 04 53 45 4c 45 | 43 54 20 63 6f 6c 75 6d |5. .SELE|CT colum|
|00003de0| 6e 2c 20 74 61 62 6c 65 | 2e 63 6f 6c 75 6d 6e 2c |n, table|.column,|
|00003df0| 20 ff 2e 03 28 74 61 62 | 6c 65 2e 20 6f 70 74 69 | ...(tab|le. opti|
|00003e00| 6f 6e 61 6c 29 00 1e ff | 20 06 46 52 4f 4d 20 74 |onal)...| .FROM t|
|00003e10| 61 62 6c 65 31 2c 20 74 | 61 62 6c 65 32 2c 20 ff |able1, t|able2, .|
|00003e20| 2e 03 00 43 ff 20 06 57 | 48 45 52 45 20 74 61 62 |...C. .W|HERE tab|
|00003e30| 6c 65 31 2e 63 6f 6c 75 | 6d 6e 31 20 3d 20 74 61 |le1.colu|mn1 = ta|
|00003e40| 62 6c 65 32 2e 63 6f 6c | 75 6d 6e 31 20 28 57 48 |ble2.col|umn1 (WH|
|00003e50| 45 52 45 20 63 6c 61 75 | 73 65 20 6f 70 74 69 6f |ERE clau|se optio|
|00003e60| 6e 61 6c 29 ff 00 03 18 | 45 78 61 6d 70 6c 65 73 |nal)....|Examples|
|00003e70| 20 6f 66 20 53 69 6d 70 | 6c 65 20 4a 6f 69 6e 73 | of Simp|le Joins|
|00003e80| ff 00 03 4b 31 2e ff 20 | 03 54 6f 20 6c 69 73 74 |...K1.. |.To list|
|00003e90| 20 77 69 74 68 20 73 61 | 6c 61 72 79 2c 20 64 65 | with sa|lary, de|
|00003ea0| 70 61 72 74 6d 65 6e 74 | 2c 20 61 6e 64 20 6c 6f |partment|, and lo|
|00003eb0| 63 61 74 69 6f 6e 20 65 | 61 63 68 20 65 6d 70 6c |cation e|ach empl|
|00003ec0| 6f 79 65 65 73 20 77 68 | 6f 20 65 61 72 6e 73 00 |oyees wh|o earns.|
|00003ed0| 30 ff 20 05 24 33 ff 30 | 03 20 6f 72 20 6d 6f 72 |0. .$3.0|. or mor|
|00003ee0| 65 20 70 65 72 20 6d 6f | 6e 74 68 2c 20 75 73 65 |e per mo|nth, use|
|00003ef0| 20 61 20 73 69 6d 70 6c | 65 20 6a 6f 69 6e 3a ff | a simpl|e join:.|
|00003f00| 00 03 1d 53 45 4c 45 43 | 54 20 65 6e 61 6d 65 2c |...SELEC|T ename,|
|00003f10| 20 73 61 6c 2c 20 64 6e | 61 6d 65 2c 20 6c 6f 63 | sal, dn|ame, loc|
|00003f20| 00 13 ff 20 05 46 52 4f | 4d 20 65 6d 70 2c 20 64 |... .FRO|M emp, d|
|00003f30| 65 70 74 00 28 ff 20 0a | 57 48 45 52 45 20 65 6d |ept.(. .|WHERE em|
|00003f40| 70 2e 64 65 70 74 6e 6f | 20 3d 20 64 65 70 74 2e |p.deptno| = dept.|
|00003f50| 64 65 70 74 6e 6f 00 1a | ff 20 0a 41 4e 44 20 73 |deptno..|. .AND s|
|00003f60| 61 6c 20 3e 3d 20 33 ff | 30 03 3b ff 00 03 07 52 |al >= 3.|0.;....R|
|00003f70| 65 73 75 6c 74 3a ff 00 | 03 1d 45 4e 41 4d 45 ff |esult:..|..ENAME.|
|00003f80| 20 03 53 41 4c ff 20 03 | 44 4e 41 4d 45 ff 20 07 | .SAL. .|DNAME. .|
|00003f90| 4c 4f 43 00 1e ff 2d 1e | 00 22 4b 49 4e 47 ff 20 |LOC...-.|."KING. |
|00003fa0| 03 35 ff 30 03 ff 20 03 | 41 43 43 4f 55 4e 54 49 |.5.0.. .|ACCOUNTI|
|00003fb0| 4e 47 20 20 4e 45 57 20 | 59 4f 52 4b 00 20 53 43 |NG NEW |YORK. SC|
|00003fc0| 4f 54 54 20 20 33 ff 30 | 03 ff 20 03 52 45 53 45 |OTT 3.0|.. .RESE|
|00003fd0| 41 52 43 48 ff 20 04 44 | 41 4c 4c 41 53 00 20 46 |ARCH. .D|ALLAS. F|
|00003fe0| 4f 52 44 ff 20 03 33 ff | 30 03 ff 20 03 52 45 53 |ORD. .3.|0.. .RES|
|00003ff0| 45 41 52 43 48 ff 20 04 | 44 41 4c 4c 41 53 ff 00 |EARCH. .|DALLAS..|
|00004000| 03 2a 32 2e ff 20 03 54 | 6f 20 66 69 6e 64 20 65 |.*2.. .T|o find e|
|00004010| 61 63 68 20 65 6d 70 6c | 6f 79 65 65 27 73 20 73 |ach empl|oyee's s|
|00004020| 61 6c 61 72 79 20 67 72 | 61 64 65 3a ff 00 03 22 |alary gr|ade:..."|
|00004030| ff 20 05 53 45 4c 45 43 | 54 20 65 6e 61 6d 65 2c |. .SELEC|T ename,|
|00004040| 20 6a 6f 62 2c 20 67 72 | 61 64 65 2c 20 73 61 6c | job, gr|ade, sal|
|00004050| 00 1b ff 20 09 46 52 4f | 4d 20 65 6d 70 2c 20 73 |... .FRO|M emp, s|
|00004060| 61 6c 67 72 61 64 65 00 | 2a ff 20 09 57 48 45 52 |algrade.|*. .WHER|
|00004070| 45 20 73 61 6c 20 42 45 | 54 57 45 45 4e 20 6c 6f |E sal BE|TWEEN lo|
|00004080| 73 61 6c 20 41 4e 44 20 | 68 69 73 61 6c 00 17 ff |sal AND |hisal...|
|00004090| 20 09 4f 52 44 45 52 20 | 42 59 20 65 6e 61 6d 65 | .ORDER |BY ename|
|000040a0| ff 00 03 07 52 65 73 75 | 6c 74 3a ff 00 03 1b 45 |....Resu|lt:....E|
|000040b0| 4e 41 4d 45 ff 20 03 4a | 4f 42 ff 20 05 47 52 41 |NAME. .J|OB. .GRA|
|000040c0| 44 45 ff 20 03 53 41 4c | 00 1b ff 2d 1b 00 1b 41 |DE. .SAL|...-...A|
|000040d0| 44 41 4d 53 ff 20 03 43 | 4c 45 52 4b ff 20 07 31 |DAMS. .C|LERK. .1|
|000040e0| 20 20 31 31 30 30 00 1b | 41 4c 4c 45 4e ff 20 03 | 1100..|ALLEN. .|
|000040f0| 53 41 4c 45 53 4d 41 4e | ff 20 04 33 20 20 31 36 |SALESMAN|. .3 16|
|00004100| 30 30 00 1b 42 4c 41 4b | 45 ff 20 03 4d 41 4e 41 |00..BLAK|E. .MANA|
|00004110| 47 45 52 ff 20 05 34 20 | 20 32 38 35 30 00 1b 43 |GER. .4 | 2850..C|
|00004120| 4c 41 52 4b ff 20 03 4d | 41 4e 41 47 45 52 ff 20 |LARK. .M|ANAGER. |
|00004130| 05 34 20 20 32 34 35 30 | ff 00 03 04 68 6b 79 77 |.4 2450|....hkyw|
|00004140| 72 64 07 b6 68 6b 79 77 | 72 64 07 b7 68 6b 79 77 |rd..hkyw|rd..hkyw|
|00004150| 72 64 07 b8 68 6b 79 77 | 72 64 07 b9 00 14 77 00 |rd..hkyw|rd....w.|
|00004160| 1f 00 01 00 00 06 47 ff | 00 05 05 57 48 45 52 45 |......G.|...WHERE|
|00004170| 00 15 2d 00 04 00 0e 00 | 00 06 18 ff 00 05 06 53 |..-.....|.......S|
|00004180| 45 4c 45 43 54 00 13 2d | 00 2b 00 15 00 00 06 56 |ELECT..-|.+.....V|
|00004190| ff 00 05 04 6a 6f 69 6e | 00 15 2d ff 00 03 17 00 |....join|..-.....|
|000041a0| 00 06 18 ff 00 05 06 53 | 45 4c 45 43 54 00 09 01 |.......S|ELECT...|
|000041b0| 00 00 06 56 ff 00 03 01 | 00 09 01 00 00 06 59 ff |...V....|......Y.|
|000041c0| 00 03 01 03 f8 00 23 00 | 0b 4f 75 74 65 72 20 4a |......#.|.Outer J|
|000041d0| 6f 69 6e 73 02 68 63 6e | 74 78 74 02 47 68 63 6e |oins.hcn|txt.Ghcn|
|000041e0| 74 78 74 02 48 00 23 00 | 42 54 68 65 20 6f 75 74 |txt.H.#.|BThe out|
|000041f0| 65 72 20 6a 6f 69 6e 20 | 6f 70 65 72 61 74 6f 72 |er join |operator|
|00004200| 20 28 2b 29 20 65 78 74 | 65 6e 64 73 20 74 68 65 | (+) ext|ends the|
|00004210| 20 72 65 73 75 6c 74 20 | 6f 66 20 61 20 6e 6f 72 | result |of a nor|
|00004220| 6d 61 6c 20 6a 6f 69 6e | 20 62 79 00 46 72 65 74 |mal join| by.Fret|
|00004230| 75 72 6e 69 6e 67 20 61 | 6c 6c 20 72 6f 77 73 20 |urning a|ll rows |
|00004240| 77 69 74 68 20 6d 61 74 | 63 68 69 6e 67 20 63 6f |with mat|ching co|
|00004250| 6c 75 6d 6e 73 20 66 72 | 6f 6d 20 74 68 65 20 74 |lumns fr|om the t|
|00004260| 77 6f 20 74 61 62 6c 65 | 73 2c 20 70 6c 75 73 20 |wo table|s, plus |
|00004270| 61 6e 79 00 3e 6e 6f 6e | 2d 6d 61 74 63 68 69 6e |any.>non|-matchin|
|00004280| 67 20 72 6f 77 73 20 66 | 72 6f 6d 20 74 68 65 20 |g rows f|rom the |
|00004290| 74 61 62 6c 65 2e 63 6f | 6c 75 6d 6e 20 77 69 74 |table.co|lumn wit|
|000042a0| 68 20 28 2b 29 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |h (+) fo|llowing |
|000042b0| 69 74 2e ff 00 03 49 59 | 6f 75 20 6d 61 79 20 6f |it....IY|ou may o|
|000042c0| 75 74 65 72 20 6a 6f 69 | 6e 20 61 20 74 61 62 6c |uter joi|n a tabl|
|000042d0| 65 20 74 6f 20 6f 6e 6c | 79 20 6f 6e 65 20 6f 74 |e to onl|y one ot|
|000042e0| 68 65 72 20 74 61 62 6c | 65 20 77 69 74 68 69 6e |her tabl|e within|
|000042f0| 20 61 20 73 69 6e 67 6c | 65 20 53 45 4c 45 43 54 | a singl|e SELECT|
|00004300| 00 0a 73 74 61 74 65 6d | 65 6e 74 2e ff 00 03 07 |..statem|ent.....|
|00004310| 53 79 6e 74 61 78 3a ff | 00 03 15 ff 20 0b 53 45 |Syntax:.|.... .SE|
|00004320| 4c 45 43 54 20 ff 2e 03 | 00 28 ff 20 10 46 52 4f |LECT ...|.(. .FRO|
|00004330| 4d 20 74 61 62 6c 65 31 | 2c 20 74 61 62 6c 65 32 |M table1|, table2|
|00004340| 2c 20 ff 2e 03 00 37 ff | 20 10 57 48 45 52 45 20 |, ....7.| .WHERE |
|00004350| 74 61 62 6c 65 31 2e 63 | 6f 6c 75 6d 6e 20 3d 20 |table1.c|olumn = |
|00004360| 74 61 62 6c 65 32 2e 63 | 6f 6c 75 6d 6e 20 28 2b |table2.c|olumn (+|
|00004370| 29 ff 00 03 18 45 78 61 | 6d 70 6c 65 20 6f 66 20 |)....Exa|mple of |
|00004380| 61 6e 20 4f 75 74 65 72 | 20 4a 6f 69 6e ff 00 03 |an Outer| Join...|
|00004390| 4b 54 6f 20 6a 6f 69 6e | 20 74 61 62 6c 65 73 20 |KTo join| tables |
|000043a0| 45 4d 50 20 61 6e 64 20 | 44 45 50 54 20 28 61 6e |EMP and |DEPT (an|
|000043b0| 20 6f 75 74 65 72 20 6a | 6f 69 6e 29 20 61 6e 64 | outer j|oin) and|
|000043c0| 20 6c 69 73 74 20 64 65 | 70 61 72 74 6d 65 6e 74 | list de|partment|
|000043d0| 73 20 33 30 20 61 6e 64 | 20 34 30 2c 00 1a 77 69 |s 30 and| 40,..wi|
|000043e0| 74 68 20 6f 72 20 77 69 | 74 68 6f 75 74 20 65 6d |th or wi|thout em|
|000043f0| 70 6c 6f 79 65 65 73 3a | ff 00 03 1b 53 45 4c 45 |ployees:|....SELE|
|00004400| 43 54 20 65 6e 61 6d 65 | 2c 20 64 65 70 74 6e 6f |CT ename|, deptno|
|00004410| 2c 20 64 6e 61 6d 65 00 | 14 ff 20 06 46 52 4f 4d |, dname.|.. .FROM|
|00004420| 20 65 6d 70 2c 20 64 65 | 70 74 00 28 ff 20 06 57 | emp, de|pt.(. .W|
|00004430| 48 45 52 45 20 64 65 70 | 74 2e 64 65 70 74 6e 6f |HERE dep|t.deptno|
|00004440| 20 3d 20 65 6d 70 2e 64 | 65 70 74 6e 6f 20 28 2b | = emp.d|eptno (+|
|00004450| 29 00 21 ff 20 06 41 4e | 44 20 64 65 70 74 2e 64 |).!. .AN|D dept.d|
|00004460| 65 70 74 6e 6f 20 49 4e | 20 28 33 30 2c 20 34 30 |eptno IN| (30, 40|
|00004470| 29 00 15 ff 20 06 4f 52 | 44 45 52 20 42 59 20 65 |)... .OR|DER BY e|
|00004480| 6e 61 6d 65 3b ff 00 03 | 07 52 65 73 75 6c 74 3a |name;...|.Result:|
|00004490| ff 00 03 15 45 4e 41 4d | 45 20 20 44 45 50 54 4e |....ENAM|E DEPTN|
|000044a0| 4f ff 20 03 44 4e 41 4d | 45 00 1a ff 2d 1a 00 1a |O. .DNAM|E...-...|
|000044b0| ff 20 10 4f 50 45 52 41 | 54 49 4f 4e 53 00 15 41 |. .OPERA|TIONS..A|
|000044c0| 4c 4c 45 4e ff 20 06 33 | 30 ff 20 03 53 41 4c 45 |LLEN. .3|0. .SALE|
|000044d0| 53 00 15 42 4c 41 4b 45 | ff 20 06 33 30 ff 20 03 |S..BLAKE|. .30. .|
|000044e0| 53 41 4c 45 53 00 15 4a | 41 4d 45 53 ff 20 06 33 |SALES..J|AMES. .3|
|000044f0| 30 ff 20 03 53 41 4c 45 | 53 00 15 4d 41 52 54 49 |0. .SALE|S..MARTI|
|00004500| 4e ff 20 05 33 30 ff 20 | 03 53 41 4c 45 53 00 15 |N. .30. |.SALES..|
|00004510| 54 55 52 4e 45 52 ff 20 | 05 33 30 ff 20 03 53 41 |TURNER. |.30. .SA|
|00004520| 4c 45 53 00 15 57 41 52 | 44 ff 20 07 33 30 ff 20 |LES..WAR|D. .30. |
|00004530| 03 53 41 4c 45 53 ff 00 | 03 04 68 6b 79 77 72 64 |.SALES..|..hkywrd|
|00004540| 07 ba 68 6b 79 77 72 64 | 07 bb 68 6b 79 77 72 64 |..hkywrd|..hkywrd|
|00004550| 07 bc 68 6b 79 77 72 64 | 07 bd 00 26 6f 00 04 ff |..hkywrd|...&o...|
|00004560| 00 04 04 a4 ff 00 05 17 | 6f 75 74 65 72 20 6a 6f |........|outer jo|
|00004570| 69 6e 20 6f 70 65 72 61 | 74 6f 72 20 28 2b 29 00 |in opera|tor (+).|
|00004580| 15 2d 00 43 00 04 00 00 | 06 18 ff 00 05 06 53 45 |.-.C....|......SE|
|00004590| 4c 45 43 54 00 19 2d 00 | 20 00 0f 00 00 06 57 ff |LECT..-.| .....W.|
|000045a0| 00 05 0a 6f 75 74 65 72 | 20 6a 6f 69 6e 00 15 2d |...outer| join..-|
|000045b0| ff 00 03 12 00 00 06 18 | ff 00 05 06 53 45 4c 45 |........|....SELE|
|000045c0| 43 54 00 09 01 00 00 06 | 57 ff 00 03 01 00 09 01 |CT......|W.......|
|000045d0| 00 00 06 5a ff 00 03 01 | 06 a6 00 41 00 07 51 75 |...Z....|...A..Qu|
|000045e0| 65 72 69 65 73 02 68 63 | 6e 74 78 74 02 49 68 63 |eries.hc|ntxt.Ihc|
|000045f0| 6e 74 78 74 02 4a 00 41 | 00 48 41 20 71 75 65 72 |ntxt.J.A|.HA quer|
|00004600| 79 20 69 73 20 61 20 53 | 51 4c 20 69 6e 73 74 72 |y is a S|QL instr|
|00004610| 75 63 74 69 6f 6e 20 74 | 6f 20 72 65 74 72 69 65 |uction t|o retrie|
|00004620| 76 65 20 64 61 74 61 20 | 66 72 6f 6d 20 6f 6e 65 |ve data |from one|
|00004630| 20 6f 72 20 6d 6f 72 65 | 20 74 61 62 6c 65 73 20 | or more| tables |
|00004640| 6f 72 00 37 76 69 65 77 | 73 2e 20 20 41 20 73 75 |or.7view|s. A su|
|00004650| 62 71 75 65 72 79 20 69 | 73 20 61 20 71 75 65 72 |bquery i|s a quer|
|00004660| 79 20 77 69 74 68 69 6e | 20 61 6e 6f 74 68 65 72 |y within| another|
|00004670| 20 73 74 61 74 65 6d 65 | 6e 74 3a ff 00 03 0f 55 | stateme|nt:....U|
|00004680| 73 65 20 71 75 65 72 69 | 65 73 20 74 6f 3a ff 00 |se queri|es to:..|
|00004690| 03 4a ff 20 05 2d 2d ff | 20 03 44 65 66 69 6e 65 |.J. .--.| .Define|
|000046a0| 20 74 68 65 20 73 65 74 | 20 6f 66 20 72 6f 77 73 | the set| of rows|
|000046b0| 20 74 6f 20 69 6e 73 65 | 72 74 20 69 6e 20 74 68 | to inse|rt in th|
|000046c0| 65 20 20 74 61 72 67 65 | 74 20 74 61 62 6c 65 20 |e targe|t table |
|000046d0| 77 69 74 68 20 43 4f 50 | 59 2c 00 21 ff 20 0a 49 |with COP|Y,.!. .I|
|000046e0| 4e 53 45 52 54 20 6f 72 | 20 43 52 45 41 54 45 20 |NSERT or| CREATE |
|000046f0| 54 41 42 4c 45 2e ff 00 | 03 42 ff 20 05 2d 2d ff |TABLE...|.B. .--.|
|00004700| 20 03 53 70 65 63 69 66 | 79 20 74 68 65 20 76 61 | .Specif|y the va|
|00004710| 6c 75 65 73 20 74 6f 20 | 61 73 73 69 67 6e 20 65 |lues to |assign e|
|00004720| 78 69 73 74 69 6e 67 20 | 72 6f 77 73 20 69 6e 20 |xisting |rows in |
|00004730| 61 6e 20 55 50 44 41 54 | 45 2e ff 00 03 47 ff 20 |an UPDAT|E....G. |
|00004740| 05 2d 2d ff 20 03 4f 62 | 74 61 69 6e 20 76 61 6c |.--. .Ob|tain val|
|00004750| 75 65 73 20 66 6f 72 20 | 63 6f 6d 70 61 72 69 73 |ues for |comparis|
|00004760| 6f 6e 20 69 6e 20 57 48 | 45 52 45 2c 20 48 41 56 |on in WH|ERE, HAV|
|00004770| 49 4e 47 2c 20 61 6e 64 | 20 53 54 41 52 54 20 57 |ING, and| START W|
|00004780| 49 54 48 00 3f ff 20 0a | 63 6c 61 75 73 65 73 20 |ITH.?. .|clauses |
|00004790| 77 69 74 68 69 6e 20 53 | 45 4c 45 43 54 2c 20 55 |within S|ELECT, U|
|000047a0| 50 44 41 54 45 2c 20 61 | 6e 64 20 44 45 4c 45 54 |PDATE, a|nd DELET|
|000047b0| 45 20 73 74 61 74 65 6d | 65 6e 74 73 2e ff 00 03 |E statem|ents....|
|000047c0| 07 53 79 6e 74 61 78 3a | 00 27 ff 20 09 53 45 4c |.Syntax:|.'. .SEL|
|000047d0| 45 43 54 ff 2e 03 57 48 | 45 52 45 20 65 78 70 72 |ECT...WH|ERE expr|
|000047e0| 20 6f 70 65 72 20 71 75 | 65 72 79 00 28 ff 20 0f | oper qu|ery.(. .|
|000047f0| ff 2e 03 48 41 56 49 4e | 47 20 65 78 70 72 20 6f |...HAVIN|G expr o|
|00004800| 70 65 72 20 71 75 65 72 | 79 00 2c ff 20 0f ff 2e |per quer|y.,. ...|
|00004810| 03 53 54 41 52 54 20 57 | 49 54 48 20 65 78 70 72 |.START W|ITH expr|
|00004820| 20 6f 70 65 72 20 71 75 | 65 72 79 ff 00 03 39 ff | oper qu|ery...9.|
|00004830| 20 0f 55 50 44 41 54 45 | ff 2e 03 53 45 54 28 63 | .UPDATE|...SET(c|
|00004840| 6f 6c 75 6d 6e 2c 20 63 | 6f 6c 75 6d 6e 2c 2e 2e |olumn, c|olumn,..|
|00004850| 29 20 6f 70 65 72 20 71 | 75 65 72 79 ff 00 03 2d |) oper q|uery...-|
|00004860| ff 20 0f 44 45 4c 45 54 | 45 ff 2e 03 57 48 45 52 |. .DELET|E...WHER|
|00004870| 45 20 65 78 70 72 20 6f | 70 65 72 20 71 75 65 72 |E expr o|per quer|
|00004880| 79 ff 00 03 1d ff 20 0f | 49 4e 53 45 52 54 ff 2e |y..... .|INSERT..|
|00004890| 03 71 75 65 72 79 ff 00 | 03 13 45 78 61 6d 70 6c |.query..|..Exampl|
|000048a0| 65 73 20 6f 66 20 51 75 | 65 72 69 65 73 ff 00 03 |es of Qu|eries...|
|000048b0| 48 31 2e ff 20 03 46 69 | 6e 64 20 6d 61 6e 61 67 |H1.. .Fi|nd manag|
|000048c0| 65 72 73 20 61 6e 64 20 | 65 6d 70 6c 6f 79 65 65 |ers and |employee|
|000048d0| 73 20 77 69 74 68 20 61 | 20 73 61 6c 61 72 79 20 |s with a| salary |
|000048e0| 6f 66 20 24 35 ff 30 03 | 20 6f 72 20 6d 6f 72 65 |of $5.0.| or more|
|000048f0| 3b 20 73 68 6f 77 20 69 | 6e 00 26 ff 20 05 6f 72 |; show i|n.&. .or|
|00004900| 64 65 72 20 6f 66 20 73 | 61 6c 61 72 79 20 69 6e |der of s|alary in|
|00004910| 20 71 75 65 72 79 20 72 | 65 73 75 6c 74 73 2e ff | query r|esults..|
|00004920| 00 03 06 51 75 65 72 79 | 3a ff 00 03 16 53 45 4c |...Query|:....SEL|
|00004930| 45 43 54 20 65 6e 61 6d | 65 2c 20 73 61 6c 2c 20 |ECT enam|e, sal, |
|00004940| 6a 6f 62 00 0e ff 20 06 | 46 52 4f 4d 20 65 6d 70 |job... .|FROM emp|
|00004950| 00 1b ff 20 06 57 48 45 | 52 45 20 6a 6f 62 20 3d |... .WHE|RE job =|
|00004960| 20 27 4d 41 4e 41 47 45 | 52 27 00 14 ff 20 06 4f | 'MANAGE|R'... .O|
|00004970| 52 20 73 61 6c 20 3e 3d | 20 35 ff 30 03 00 18 ff |R sal >=| 5.0....|
|00004980| 20 06 4f 52 44 45 52 20 | 42 59 20 73 61 6c 20 44 | .ORDER |BY sal D|
|00004990| 45 53 43 3b ff 00 03 07 | 52 65 73 75 6c 74 3a ff |ESC;....|Result:.|
|000049a0| 00 03 13 45 4e 41 4d 45 | ff 20 06 53 41 4c 20 20 |...ENAME|. .SAL |
|000049b0| 4a 4f 42 00 18 ff 2d 18 | 00 19 4b 49 4e 47 ff 20 |JOB...-.|..KING. |
|000049c0| 06 35 ff 30 03 20 20 50 | 52 45 53 49 44 45 4e 54 |.5.0. P|RESIDENT|
|000049d0| 00 17 4a 4f 4e 45 53 ff | 20 05 32 39 37 35 20 20 |..JONES.| .2975 |
|000049e0| 4d 41 4e 41 47 45 52 00 | 17 42 4c 41 4b 45 ff 20 |MANAGER.|.BLAKE. |
|000049f0| 05 32 38 35 30 20 20 4d | 41 4e 41 47 45 52 00 17 |.2850 M|ANAGER..|
|00004a00| 43 4c 41 52 4b ff 20 05 | 32 34 35 30 20 20 4d 41 |CLARK. .|2450 MA|
|00004a10| 4e 41 47 45 52 ff 00 03 | 49 32 2e ff 20 03 4c 69 |NAGER...|I2.. .Li|
|00004a20| 73 74 20 6e 61 6d 65 73 | 20 61 6e 64 20 64 65 70 |st names| and dep|
|00004a30| 61 72 74 6d 65 6e 74 73 | 20 6f 66 20 65 6d 70 6c |artments| of empl|
|00004a40| 6f 79 65 65 73 20 77 68 | 6f 20 61 72 65 20 61 6e |oyees wh|o are an|
|00004a50| 61 6c 79 73 74 73 2c 20 | 63 6c 65 72 6b 73 2c 20 |alysts, |clerks, |
|00004a60| 6f 72 00 13 ff 20 05 74 | 68 65 20 70 72 65 73 69 |or... .t|he presi|
|00004a70| 64 65 6e 74 2e ff 00 03 | 06 51 75 65 72 79 3a ff |dent....|.Query:.|
|00004a80| 00 03 19 53 45 4c 45 43 | 54 20 65 6e 61 6d 65 2c |...SELEC|T ename,|
|00004a90| 20 6a 6f 62 2c 20 64 65 | 70 74 6e 6f 00 0b ff 20 | job, de|ptno... |
|00004aa0| 03 46 52 4f 4d 20 65 6d | 70 00 1b ff 20 03 57 48 |.FROM em|p... .WH|
|00004ab0| 45 52 45 20 6a 6f 62 20 | 49 4e 20 28 27 41 4e 41 |ERE job |IN ('ANA|
|00004ac0| 4c 59 53 54 27 2c 00 18 | ff 20 03 27 43 4c 45 52 |LYST',..|. .'CLER|
|00004ad0| 4b 27 2c 20 27 50 52 45 | 53 49 44 45 4e 54 27 29 |K', 'PRE|SIDENT')|
|00004ae0| 00 12 ff 20 03 4f 52 44 | 45 52 20 42 59 20 65 6e |... .ORD|ER BY en|
|00004af0| 61 6d 65 3b ff 00 03 07 | 52 65 73 75 6c 74 3a ff |ame;....|Result:.|
|00004b00| 00 03 18 45 4e 41 4d 45 | ff 20 04 4a 4f 42 ff 20 |...ENAME|. .JOB. |
|00004b10| 06 44 45 50 54 4e 4f 00 | 18 ff 2d 18 00 18 41 44 |.DEPTNO.|..-...AD|
|00004b20| 41 4d 53 ff 20 04 43 4c | 45 52 4b ff 20 08 32 30 |AMS. .CL|ERK. .20|
|00004b30| 00 18 46 4f 52 44 ff 20 | 05 41 4e 41 4c 59 53 54 |..FORD. |.ANALYST|
|00004b40| ff 20 06 32 30 00 18 4a | 41 4d 45 53 ff 20 04 43 |. .20..J|AMES. .C|
|00004b50| 4c 45 52 4b ff 20 08 32 | 30 00 18 4b 49 4e 47 ff |LERK. .2|0..KING.|
|00004b60| 20 05 50 52 45 53 49 44 | 45 4e 54 ff 20 04 31 30 | .PRESID|ENT. .10|
|00004b70| ff 00 03 0b 68 6b 79 77 | 72 64 07 be 68 6b 79 77 |....hkyw|rd..hkyw|
|00004b80| 72 64 07 bf 68 6b 79 77 | 72 64 07 c0 68 6b 79 77 |rd..hkyw|rd..hkyw|
|00004b90| 72 64 07 c1 68 6b 79 77 | 72 64 07 c2 68 6b 79 77 |rd..hkyw|rd..hkyw|
|00004ba0| 72 64 07 c3 68 6b 79 77 | 72 64 07 c4 68 6b 79 77 |rd..hkyw|rd..hkyw|
|00004bb0| 72 64 07 c5 68 6b 79 77 | 72 64 07 c6 68 6b 79 77 |rd..hkyw|rd..hkyw|
|00004bc0| 72 64 07 c7 68 6b 79 77 | 72 64 07 c8 00 12 73 00 |rd..hkyw|rd....s.|
|00004bd0| 0d ff 00 04 03 e8 ff 00 | 05 03 53 51 4c 00 17 2d |........|..SQL..-|
|00004be0| 00 0a 00 01 00 00 06 5a | ff 00 05 08 73 75 62 71 |.......Z|....subq|
|00004bf0| 75 65 72 79 00 15 2d 00 | 09 00 0e 00 00 06 18 ff |uery..-.|........|
|00004c00| 00 05 06 53 45 4c 45 43 | 54 00 14 77 00 12 00 0e |...SELEC|T..w....|
|00004c10| 00 00 06 47 ff 00 05 05 | 57 48 45 52 45 00 15 2d |...G....|WHERE..-|
|00004c20| 00 12 00 0f 00 00 06 49 | ff 00 05 06 48 41 56 49 |.......I|....HAVI|
|00004c30| 4e 47 00 19 2d 00 12 00 | 10 00 00 06 4b ff 00 05 |NG..-...|....K...|
|00004c40| 0a 53 54 41 52 54 20 57 | 49 54 48 00 15 2d 00 0f |.START W|ITH..-..|
|00004c50| 00 12 00 00 06 2f ff 00 | 05 06 55 50 44 41 54 45 |...../..|..UPDATE|
|00004c60| 00 15 64 00 0f 00 14 00 | 00 05 f1 ff 00 05 06 44 |..d.....|.......D|
|00004c70| 45 4c 45 54 45 00 15 2d | 00 0f 00 16 00 00 06 01 |ELETE..-|........|
|00004c80| ff 00 05 06 49 4e 53 45 | 52 54 00 15 2d ff 00 03 |....INSE|RT..-...|
|00004c90| 1f 00 00 06 18 ff 00 05 | 06 53 45 4c 45 43 54 00 |........|.SELECT.|
|00004ca0| 13 2d 00 06 00 20 00 00 | 06 45 ff 00 05 04 46 52 |.-... ..|.E....FR|
|00004cb0| 4f 4d 00 09 01 00 00 06 | 59 ff 00 03 01 00 09 01 |OM......|Y.......|
|00004cc0| 00 00 06 5b ff 00 03 01 | 05 da 00 29 00 1c 53 75 |...[....|...)..Su|
|00004cd0| 62 71 75 65 72 69 65 73 | 20 61 6e 64 20 53 75 62 |bqueries| and Sub|
|00004ce0| 71 75 65 72 79 20 53 65 | 74 73 02 68 63 6e 74 78 |query Se|ts.hcntx|
|00004cf0| 74 02 4b 68 63 6e 74 78 | 74 02 4c 00 29 00 44 41 |t.Khcntx|t.L.).DA|
|00004d00| 20 73 75 62 71 75 65 72 | 79 20 69 73 20 61 20 73 | subquer|y is a s|
|00004d10| 74 61 74 65 6d 65 6e 74 | 20 75 73 65 64 20 61 73 |tatement| used as|
|00004d20| 20 74 68 65 20 72 69 67 | 68 74 2d 73 69 64 65 20 | the rig|ht-side |
|00004d30| 65 78 70 72 65 73 73 69 | 6f 6e 20 77 69 74 68 69 |expressi|on withi|
|00004d40| 6e 20 61 00 49 57 48 45 | 52 45 20 63 6c 61 75 73 |n a.IWHE|RE claus|
|00004d50| 65 2d 2d 61 20 71 75 65 | 72 79 20 73 75 62 6f 72 |e--a que|ry subor|
|00004d60| 64 69 6e 61 74 65 2d 2d | 74 6f 20 61 6e 6f 74 68 |dinate--|to anoth|
|00004d70| 65 72 20 71 75 65 72 79 | 2e 20 59 6f 75 20 63 61 |er query|. You ca|
|00004d80| 6e 20 61 6c 73 6f 20 70 | 75 74 20 6f 6e 65 00 19 |n also p|ut one..|
|00004d90| 73 75 62 2d 71 75 65 72 | 79 20 77 69 74 68 69 6e |sub-quer|y within|
|00004da0| 20 61 6e 6f 74 68 65 72 | 2e ff 00 03 46 53 75 62 | another|....FSub|
|00004db0| 71 75 65 72 79 20 73 65 | 74 73 ff 20 07 53 51 4c |query se|ts. .SQL|
|00004dc0| 20 61 6c 6c 6f 77 73 20 | 74 68 65 20 75 73 65 20 | allows |the use |
|00004dd0| 6f 66 20 61 20 63 6f 6d | 70 61 72 69 73 6f 6e 20 |of a com|parison |
|00004de0| 6f 70 65 72 61 74 6f 72 | 20 77 69 74 68 20 61 00 |operator| with a.|
|00004df0| 4a ff 20 14 6d 75 6c 74 | 69 70 6c 65 2d 76 61 6c |J. .mult|iple-val|
|00004e00| 75 65 20 73 75 62 71 75 | 65 72 79 20 69 66 20 74 |ue subqu|ery if t|
|00004e10| 68 65 20 77 6f 72 64 73 | 20 41 4e 59 2c 20 41 4c |he words| ANY, AL|
|00004e20| 4c 2c 20 6f 72 20 53 4f | 4d 45 00 2b ff 20 14 61 |L, or SO|ME.+. .a|
|00004e30| 72 65 20 61 66 74 65 72 | 20 74 68 65 20 6f 70 65 |re after| the ope|
|00004e40| 72 61 74 6f 72 2e ff 00 | 03 07 53 79 6e 74 61 78 |rator...|..Syntax|
|00004e50| 3a ff 00 03 32 53 45 4c | 45 43 54 ff 20 03 53 45 |:...2SEL|ECT. .SE|
|00004e60| 4c 45 43 54 ff 2e 03 57 | 48 45 52 45 20 65 78 70 |LECT...W|HERE exp|
|00004e70| 72 20 6f 70 65 72 61 74 | 6f 72 20 28 53 45 4c 45 |r operat|or (SELE|
|00004e80| 43 54 ff 2e 03 29 3b 00 | 29 55 50 44 41 54 45 ff |CT...);.|)UPDATE.|
|00004e90| 2e 03 57 48 45 52 45 20 | 65 78 70 72 20 6f 70 65 |..WHERE |expr ope|
|00004ea0| 72 61 74 6f 72 20 28 53 | 45 4c 45 43 54 ff 2e 03 |rator (S|ELECT...|
|00004eb0| 29 3b 00 29 44 45 4c 45 | 54 45 ff 2e 03 57 48 45 |);.)DELE|TE...WHE|
|00004ec0| 52 45 20 65 78 70 72 20 | 6f 70 65 72 61 74 6f 72 |RE expr |operator|
|00004ed0| 20 28 53 45 4c 45 43 54 | ff 2e 03 29 3b ff 00 03 | (SELECT|...);...|
|00004ee0| 27 53 45 4c 45 43 54 20 | 65 6e 61 6d 65 20 46 52 |'SELECT |ename FR|
|00004ef0| 4f 4d 20 65 6d 70 20 57 | 48 45 52 45 20 63 69 74 |OM emp W|HERE cit|
|00004f00| 79 6e 61 6d 65 20 49 4e | 00 2b ff 20 04 28 53 45 |yname IN|.+. .(SE|
|00004f10| 4c 45 43 54 20 69 64 20 | 46 52 4f 4d 20 63 69 74 |LECT id |FROM cit|
|00004f20| 79 20 57 48 45 52 45 20 | 73 74 61 74 65 61 62 62 |y WHERE |stateabb|
|00004f30| 72 20 49 4e 00 27 ff 20 | 05 28 53 45 4c 45 43 54 |r IN.'. |.(SELECT|
|00004f40| 20 73 74 61 74 65 61 62 | 62 72 20 46 52 4f 4d 20 | stateab|br FROM |
|00004f50| 73 74 61 74 65 20 57 48 | 45 52 45 00 1b ff 20 07 |state WH|ERE... .|
|00004f60| 6e 61 6d 65 20 3d 20 27 | 4e 45 57 20 59 4f 52 4b |name = '|NEW YORK|
|00004f70| 27 29 29 3b ff 00 03 15 | 53 45 4c 45 43 54 20 65 |'));....|SELECT e|
|00004f80| 6e 61 6d 65 20 46 52 4f | 4d 20 65 6d 70 00 27 ff |name FRO|M emp.'.|
|00004f90| 20 03 57 48 45 52 45 20 | 6a 6f 62 20 3c 3e 20 27 | .WHERE |job <> '|
|00004fa0| 4d 41 4e 41 47 45 52 27 | 20 41 4e 44 20 73 61 6c |MANAGER'| AND sal|
|00004fb0| 20 3e 20 41 4e 59 00 30 | ff 20 06 28 53 45 4c 45 | > ANY.0|. .(SELE|
|00004fc0| 43 54 20 73 61 6c 20 46 | 52 4f 4d 20 65 6d 70 20 |CT sal F|ROM emp |
|00004fd0| 57 48 45 52 45 20 6a 6f | 62 3d 27 4d 41 4e 41 47 |WHERE jo|b='MANAG|
|00004fe0| 45 52 27 29 3b ff 00 03 | 09 45 78 61 6d 70 6c 65 |ER');...|.Example|
|00004ff0| 73 3a ff 00 03 4b 54 68 | 69 73 20 73 75 62 71 75 |s:...KTh|is subqu|
|00005000| 65 72 79 20 67 69 76 65 | 73 20 65 61 63 68 20 4d |ery give|s each M|
|00005010| 41 4e 41 47 45 52 20 69 | 6e 20 74 68 65 20 44 41 |ANAGER i|n the DA|
|00005020| 4c 4c 41 53 20 6f 66 66 | 69 63 65 20 61 20 73 61 |LLAS off|ice a sa|
|00005030| 6c 61 72 79 20 65 71 75 | 61 6c 20 74 6f 20 74 68 |lary equ|al to th|
|00005040| 65 00 20 63 6f 6d 70 61 | 6e 79 27 73 20 68 69 67 |e. compa|ny's hig|
|00005050| 68 65 73 74 20 70 61 69 | 64 20 65 6d 70 6c 6f 79 |hest pai|d employ|
|00005060| 65 65 3a ff 00 03 0a 55 | 50 44 41 54 45 20 65 6d |ee:....U|PDATE em|
|00005070| 70 00 28 ff 20 04 53 45 | 54 20 73 61 6c 20 3d 20 |p.(. .SE|T sal = |
|00005080| 28 53 45 4c 45 43 54 20 | 4d 41 58 28 73 61 6c 29 |(SELECT |MAX(sal)|
|00005090| 20 46 52 4f 4d 20 65 6d | 70 29 00 1a ff 20 05 57 | FROM em|p)... .W|
|000050a0| 48 45 52 45 20 4a 4f 42 | 20 3d 20 27 4d 41 4e 41 |HERE JOB| = 'MANA|
|000050b0| 47 45 52 27 00 42 ff 20 | 05 41 4e 44 20 44 45 50 |GER'.B. |.AND DEP|
|000050c0| 54 4e 4f 20 49 4e 20 28 | 53 45 4c 45 43 54 20 64 |TNO IN (|SELECT d|
|000050d0| 65 70 74 6e 6f 20 46 52 | 4f 4d 20 64 65 70 74 20 |eptno FR|OM dept |
|000050e0| 57 48 45 52 45 20 6c 6f | 63 20 3d 20 27 44 41 4c |WHERE lo|c = 'DAL|
|000050f0| 4c 41 53 27 29 3b ff 00 | 03 48 55 73 65 20 3d 20 |LAS');..|.HUse = |
|00005100| 74 6f 20 65 71 75 61 74 | 65 20 61 20 66 69 65 6c |to equat|e a fiel|
|00005110| 64 20 77 69 74 68 20 61 | 20 73 75 62 71 75 65 72 |d with a| subquer|
|00005120| 79 20 69 66 20 74 68 65 | 20 73 75 62 71 75 65 72 |y if the| subquer|
|00005130| 79 20 72 65 74 75 72 6e | 73 20 6f 6e 6c 79 20 6f |y return|s only o|
|00005140| 6e 65 00 41 76 61 6c 75 | 65 3b 20 75 73 65 20 49 |ne.Avalu|e; use I|
|00005150| 4e 20 69 6e 73 74 65 61 | 64 20 6f 66 20 3d 20 69 |N instea|d of = i|
|00005160| 66 20 61 20 73 75 62 71 | 75 65 72 79 20 72 65 74 |f a subq|uery ret|
|00005170| 75 72 6e 73 20 6d 75 6c | 74 69 70 6c 65 20 76 61 |urns mul|tiple va|
|00005180| 6c 75 65 73 2e ff 00 03 | 38 54 6f 20 6c 69 73 74 |lues....|8To list|
|00005190| 20 65 6d 70 6c 6f 79 65 | 65 73 20 77 68 6f 20 67 | employe|es who g|
|000051a0| 6f 74 20 61 20 62 6f 6e | 75 73 20 77 69 74 68 6f |ot a bon|us witho|
|000051b0| 75 74 20 63 68 61 6e 67 | 69 6e 67 20 6a 6f 62 73 |ut chang|ing jobs|
|000051c0| 3a ff 00 03 18 ff 20 05 | 53 45 4c 45 43 54 20 65 |:..... .|SELECT e|
|000051d0| 6d 70 6e 6f 2c 20 65 6e | 61 6d 65 00 0f ff 20 07 |mpno, en|ame... .|
|000051e0| 46 52 4f 4d 20 65 6d 70 | 00 3b ff 20 07 57 48 45 |FROM emp|.;. .WHE|
|000051f0| 52 45 20 28 6a 6f 62 2c | 20 65 6e 61 6d 65 29 20 |RE (job,| ename) |
|00005200| 3d 20 28 53 45 4c 45 43 | 54 20 6a 6f 62 2c 20 65 |= (SELEC|T job, e|
|00005210| 6e 61 6d 65 20 46 52 4f | 4d 20 62 6f 6e 75 73 29 |name FRO|M bonus)|
|00005220| 3b ff 00 03 08 68 6b 79 | 77 72 64 07 c9 68 6b 79 |;....hky|wrd..hky|
|00005230| 77 72 64 07 ca 68 6b 79 | 77 72 64 07 cb 68 6b 79 |wrd..hky|wrd..hky|
|00005240| 77 72 64 07 cc 68 6b 79 | 77 72 64 07 cd 68 6b 79 |wrd..hky|wrd..hky|
|00005250| 77 72 64 07 ce 68 6b 79 | 77 72 64 07 cf 68 6b 79 |wrd..hky|wrd..hky|
|00005260| 77 72 64 07 d0 00 1b 77 | ff 00 03 01 00 00 06 47 |wrd....w|.......G|
|00005270| ff 00 05 0c 57 48 45 52 | 45 20 63 6c 61 75 73 65 |....WHER|E clause|
|00005280| 00 14 71 00 2e 00 01 00 | 00 06 59 ff 00 05 05 71 |..q.....|..Y....q|
|00005290| 75 65 72 79 00 22 2d 00 | 2c 00 04 00 00 04 9e ff |uery."-.|,.......|
|000052a0| 00 05 13 63 6f 6d 70 61 | 72 69 73 6f 6e 20 6f 70 |...compa|rison op|
|000052b0| 65 72 61 74 6f 72 00 15 | 2d ff 00 03 0a 00 00 06 |erator..|-.......|
|000052c0| 18 ff 00 05 06 53 45 4c | 45 43 54 00 17 6f 00 1d |.....SEL|ECT..o..|
|000052d0| 00 0a 00 00 04 9c ff 00 | 05 08 6f 70 65 72 61 74 |........|..operat|
|000052e0| 6f 72 00 15 2d ff 00 03 | 1c 00 00 06 2f ff 00 05 |or..-...|..../...|
|000052f0| 06 55 50 44 41 54 45 00 | 15 2d 00 0f 00 1d 00 00 |.UPDATE.|.-......|
|00005300| 06 18 ff 00 05 06 53 45 | 4c 45 43 54 00 14 2d 00 |......SE|LECT..-.|
|00005310| 05 00 1e 00 00 06 47 ff | 00 05 05 57 48 45 52 45 |......G.|...WHERE|
|00005320| 00 09 01 00 00 06 5a ff | 00 03 01 00 09 01 00 00 |......Z.|........|
|00005330| 06 5c ff 00 03 01 04 db | 00 2c 00 15 43 6f 72 72 |.\......|.,..Corr|
|00005340| 65 6c 61 74 65 64 20 53 | 75 62 71 75 65 72 69 65 |elated S|ubquerie|
|00005350| 73 02 68 63 6e 74 78 74 | 02 4d 68 63 6e 74 78 74 |s.hcntxt|.Mhcntxt|
|00005360| 02 4e 00 2c 00 43 41 20 | 63 6f 72 72 65 6c 61 74 |.N.,.CA |correlat|
|00005370| 65 64 20 73 75 62 71 75 | 65 72 79 20 65 76 61 6c |ed subqu|ery eval|
|00005380| 75 61 74 65 73 20 61 20 | 71 75 65 72 79 20 66 6f |uates a |query fo|
|00005390| 72 20 45 56 45 52 59 20 | 52 4f 57 20 69 6e 20 74 |r EVERY |ROW in t|
|000053a0| 68 65 20 70 61 72 65 6e | 74 00 43 73 74 61 74 65 |he paren|t.Cstate|
|000053b0| 6d 65 6e 74 2e 20 20 55 | 73 65 20 61 20 74 61 62 |ment. U|se a tab|
|000053c0| 6c 65 20 6f 72 20 61 6c | 69 61 73 20 6e 61 6d 65 |le or al|ias name|
|000053d0| 20 77 69 74 68 20 65 61 | 63 68 20 63 6f 6c 75 6d | with ea|ch colum|
|000053e0| 6e 20 66 6f 72 20 63 6c | 61 72 69 74 79 3a ff 00 |n for cl|arity:..|
|000053f0| 03 3b 53 45 4c 45 43 54 | 20 63 6f 6c 75 6d 6e 5f |.;SELECT| column_|
|00005400| 6c 69 73 74 20 20 46 52 | 4f 4d 20 74 61 62 6c 65 |list FR|OM table|
|00005410| 31 20 61 6c 69 61 73 31 | 20 20 57 48 45 52 45 20 |1 alias1| WHERE |
|00005420| 65 78 70 72 20 6f 70 65 | 72 61 74 6f 72 00 17 ff |expr ope|rator...|
|00005430| 20 04 28 53 45 4c 45 43 | 54 20 63 6f 6c 75 6d 6e | .(SELEC|T column|
|00005440| 5f 6c 69 73 74 00 17 ff | 20 05 46 52 4f 4d 20 74 |_list...| .FROM t|
|00005450| 61 62 6c 65 32 20 61 6c | 69 61 73 32 00 31 ff 20 |able2 al|ias2.1. |
|00005460| 05 57 48 45 52 45 20 61 | 6c 69 61 73 31 2e 63 6f |.WHERE a|lias1.co|
|00005470| 6c 75 6d 6e 20 6f 70 65 | 72 61 74 6f 72 20 61 6c |lumn ope|rator al|
|00005480| 69 61 73 32 2e 63 6f 6c | 75 6d 6e 29 3b ff 00 03 |ias2.col|umn);...|
|00005490| 20 55 50 44 41 54 45 20 | 63 6f 6c 75 6d 6e 5f 6c | UPDATE |column_l|
|000054a0| 69 73 74 20 20 53 45 54 | 20 63 6f 6c 75 6d 6e 20 |ist SET| column |
|000054b0| 3d 00 0f ff 20 03 28 53 | 45 4c 45 43 54 20 65 78 |=... .(S|ELECT ex|
|000054c0| 70 72 00 16 ff 20 04 46 | 52 4f 4d 20 74 61 62 6c |pr... .F|ROM tabl|
|000054d0| 65 32 20 61 6c 69 61 73 | 32 00 29 ff 20 04 57 48 |e2 alias|2.). .WH|
|000054e0| 45 52 45 20 61 6c 69 61 | 73 31 2e 63 6f 6c 75 6d |ERE alia|s1.colum|
|000054f0| 6e 20 3d 20 61 6c 69 61 | 73 32 2e 63 6f 6c 75 6d |n = alia|s2.colum|
|00005500| 6e 29 3b ff 00 03 2f 44 | 45 4c 45 54 45 20 46 52 |n);.../D|ELETE FR|
|00005510| 4f 4d 20 74 61 62 6c 65 | 31 20 61 6c 69 61 73 31 |OM table|1 alias1|
|00005520| 20 57 48 45 52 45 20 63 | 6f 6c 75 6d 6e 20 6f 70 | WHERE c|olumn op|
|00005530| 65 72 61 74 6f 72 00 0f | ff 20 03 28 53 45 4c 45 |erator..|. .(SELE|
|00005540| 43 54 20 65 78 70 72 00 | 16 ff 20 04 46 52 4f 4d |CT expr.|.. .FROM|
|00005550| 20 74 61 62 6c 65 32 20 | 61 6c 69 61 73 32 00 29 | table2 |alias2.)|
|00005560| ff 20 04 57 48 45 52 45 | 20 61 6c 69 61 73 31 2e |. .WHERE| alias1.|
|00005570| 63 6f 6c 75 6d 6e 20 3d | 20 61 6c 69 61 73 32 2e |column =| alias2.|
|00005580| 63 6f 6c 75 6d 6e 29 3b | ff 00 03 07 45 78 61 6d |column);|....Exam|
|00005590| 70 6c 65 ff 00 03 47 54 | 68 69 73 20 63 6f 72 72 |ple...GT|his corr|
|000055a0| 65 6c 61 74 65 64 20 73 | 75 62 71 75 65 72 79 20 |elated s|ubquery |
|000055b0| 64 69 73 70 6c 61 79 73 | 20 61 6c 6c 20 65 6d 70 |displays| all emp|
|000055c0| 6c 6f 79 65 65 73 20 77 | 68 6f 73 65 20 73 61 6c |loyees w|hose sal|
|000055d0| 61 72 79 20 69 73 20 67 | 72 65 61 74 65 72 00 30 |ary is g|reater.0|
|000055e0| 74 68 61 6e 20 74 68 65 | 20 61 76 65 72 61 67 65 |than the| average|
|000055f0| 20 73 61 6c 61 72 79 20 | 6f 66 20 74 68 65 69 72 | salary |of their|
|00005600| 20 6f 77 6e 20 64 65 70 | 61 72 74 b1 22 fb 6d 65 | own dep|art.".me|
|00005610| 6e 74 2e fb 00 03 06 51 | 75 65 72 79 3a fb 00 03 |nt.....Q|uery:...|
|00005620| 19 53 45 4c 45 43 54 20 | 65 6e 61 6d 65 2c 20 64 |.SELECT |ename, d|
|00005630| 65 70 74 6e 6f 2c 20 73 | 61 6c 00 16 fb 20 05 46 |eptno, s|al... .F|
|00005640| 52 4f 4d 20 65 6d 70 20 | 65 6d 70 5f 74 77 69 6e |ROM emp |emp_twin|
|00005650| 00 21 fb 20 05 57 48 45 | 52 45 20 73 61 6c 20 3e |.!. .WHE|RE sal >|
|00005660| 20 28 53 45 4c 45 43 54 | 20 41 56 47 28 73 61 6c | (SELECT| AVG(sal|
|00005670| 29 00 0e fb 20 06 46 52 | 4f 4d 20 65 6d 70 00 29 |)... .FR|OM emp.)|
|00005680| fb 20 06 57 48 45 52 45 | 20 65 6d 70 2e 64 65 70 |. .WHERE| emp.dep|
|00005690| 74 6e 6f 20 3d 20 65 6d | 70 5f 74 77 69 6e 2e 64 |tno = em|p_twin.d|
|000056a0| 65 70 74 6e 6f 29 00 16 | fb 20 06 4f 52 44 45 52 |eptno)..|. .ORDER|
|000056b0| 20 42 59 20 64 65 70 74 | 6e 6f 3b fb 00 03 07 52 | BY dept|no;....R|
|000056c0| 65 73 75 6c 74 3a fb 00 | 03 12 44 45 50 54 4e 4f |esult:..|..DEPTNO|
|000056d0| 20 45 4e 41 4d 45 fb 20 | 03 53 41 4c 00 12 fb 2d | ENAME. |.SAL...-|
|000056e0| 12 00 12 fb 20 04 31 30 | 20 4b 49 4e 47 fb 20 03 |.... .10| KING. .|
|000056f0| 35 fb 30 03 00 12 fb 20 | 04 32 30 20 4a 4f 4e 45 |5.0.... |.20 JONE|
|00005700| 53 20 20 32 39 37 35 00 | 12 fb 20 04 32 30 20 53 |S 2975.|.. .20 S|
|00005710| 43 4f 54 54 20 20 33 fb | 30 03 00 12 fb 20 04 32 |COTT 3.|0.... .2|
|00005720| 30 20 46 4f 52 44 fb 20 | 03 33 fb 30 03 00 12 fb |0 FORD. |.3.0....|
|00005730| 20 04 33 30 20 41 4c 4c | 45 4e 20 20 31 36 30 30 | .30 ALL|EN 1600|
|00005740| 00 12 fb 20 04 33 30 20 | 42 4c 41 4b 45 20 20 32 |... .30 |BLAKE 2|
|00005750| 38 35 30 fb 00 03 40 54 | 68 65 20 52 4f 57 49 44 |850...@T|he ROWID|
|00005760| 20 77 69 74 68 20 44 45 | 4c 45 54 45 20 65 78 61 | with DE|LETE exa|
|00005770| 6d 70 6c 65 20 73 68 6f | 77 73 20 61 6e 6f 74 68 |mple sho|ws anoth|
|00005780| 65 72 20 63 6f 72 72 65 | 6c 61 74 65 64 20 73 75 |er corre|lated su|
|00005790| 62 71 75 65 72 79 2e fb | 00 03 0a 68 6b 79 77 72 |bquery..|...hkywr|
|000057a0| 64 07 d1 68 6b 79 77 72 | 64 07 d2 68 6b 79 77 72 |d..hkywr|d..hkywr|
|000057b0| 64 07 d3 68 6b 79 77 72 | 64 07 d4 68 6b 79 77 72 |d..hkywr|d..hkywr|
|000057c0| 64 07 d5 68 6b 79 77 72 | 64 07 d6 68 6b 79 77 72 |d..hkywr|d..hkywr|
|000057d0| 64 07 d7 68 6b 79 77 72 | 64 07 d8 68 6b 79 77 72 |d..hkywr|d..hkywr|
|000057e0| 64 07 d9 68 6b 79 77 72 | 64 07 da 00 14 71 00 22 |d..hkywr|d....q."|
|000057f0| fb 00 04 06 59 fb 00 05 | 05 71 75 65 72 79 00 14 |....Y...|.query..|
|00005800| 61 00 1b 00 01 00 00 05 | b5 fb 00 05 05 61 6c 69 |a.......|.....ali|
|00005810| 61 73 00 15 2d fb 00 03 | 03 00 00 06 18 fb 00 05 |as..-...|........|
|00005820| 06 53 45 4c 45 43 54 00 | 14 77 00 28 00 03 00 00 |.SELECT.|.w.(....|
|00005830| 06 47 fb 00 05 05 57 48 | 45 52 45 00 13 78 00 2e |.G....WH|ERE..x..|
|00005840| 00 03 00 00 04 74 fb 00 | 05 04 65 78 70 72 00 17 |.....t..|..expr..|
|00005850| 6f 00 33 00 03 00 00 04 | 9c fb 00 05 08 6f 70 65 |o.3.....|.....ope|
|00005860| 72 61 74 6f 72 00 15 75 | fb 00 03 08 00 00 06 2f |rator..u|......./|
|00005870| fb 00 05 06 55 50 44 41 | 54 45 00 15 64 fb 00 03 |....UPDA|TE..d...|
|00005880| 0d 00 00 05 f1 fb 00 05 | 06 44 45 4c 45 54 45 00 |........|.DELETE.|
|00005890| 22 2d 00 05 00 14 00 00 | 06 5b fb 00 05 13 63 6f |"-......|.[....co|
|000058a0| 72 72 65 6c 61 74 65 64 | 20 73 75 62 71 75 65 72 |rrelated| subquer|
|000058b0| 79 00 15 2d fb 00 03 19 | 00 00 06 18 fb 00 05 06 |y..-....|........|
|000058c0| 53 45 4c 45 43 54 00 09 | 01 00 00 06 5b fb 00 03 |SELECT..|....[...|
|000058d0| 01 00 09 01 00 00 06 5f | fb 00 03 01 02 65 00 0b |......._|.....e..|
|000058e0| 00 13 44 69 73 74 72 69 | 62 75 74 65 64 20 51 75 |..Distri|buted Qu|
|000058f0| 65 72 69 65 73 02 68 63 | 6e 74 78 74 02 4f 68 63 |eries.hc|ntxt.Ohc|
|00005900| 6e 74 78 74 02 50 00 0b | 00 47 41 20 64 69 73 74 |ntxt.P..|.GA dist|
|00005910| 72 69 62 75 74 65 64 20 | 71 75 65 72 79 20 72 65 |ributed |query re|
|00005920| 71 75 69 72 65 73 20 74 | 68 65 20 75 73 65 20 6f |quires t|he use o|
|00005930| 66 20 61 20 64 61 74 61 | 62 61 73 65 20 6c 69 6e |f a data|base lin|
|00005940| 6b 20 62 65 74 77 65 65 | 6e 20 73 79 73 74 65 6d |k betwee|n system|
|00005950| 73 00 47 77 69 74 68 20 | 53 51 4c 2a 4e 65 74 2e |s.Gwith |SQL*Net.|
|00005960| 20 20 54 68 65 20 73 79 | 6e 74 61 78 20 69 73 20 | The sy|ntax is |
|00005970| 74 68 65 20 73 61 6d 65 | 20 61 73 20 6f 74 68 65 |the same| as othe|
|00005980| 72 20 71 75 65 72 69 65 | 73 3b 20 61 20 64 61 74 |r querie|s; a dat|
|00005990| 61 62 61 73 65 20 6c 69 | 6e 6b 00 2b 6e 61 6d 65 |abase li|nk.+name|
|000059a0| 20 6f 72 20 69 74 73 20 | 73 79 6e 6f 6e 79 6d 20 | or its |synonym |
|000059b0| 66 6f 6c 6c 6f 77 73 20 | 74 68 65 20 74 61 62 6c |follows |the tabl|
|000059c0| 65 20 6e 61 6d 65 3a fb | 00 03 24 fb 20 09 53 45 |e name:.|..$. .SE|
|000059d0| 4c 45 43 54 20 63 6f 6c | 75 6d 6e 32 2c 20 63 6f |LECT col|umn2, co|
|000059e0| 6c 75 6d 6e 33 2c fb 2e | 03 00 39 fb 20 0d 46 52 |lumn3,..|..9. .FR|
|000059f0| 4f 4d 20 72 65 6d 6f 74 | 65 5f 74 61 62 6c 65 40 |OM remot|e_table@|
|00005a00| 64 61 74 61 62 61 73 65 | 5f 6c 69 6e 6b 2c 20 6c |database|_link, l|
|00005a10| 6f 63 61 6c 5f 74 61 62 | 6c 65 00 3f fb 20 0d 57 |ocal_tab|le.?. .W|
|00005a20| 48 45 52 45 20 72 65 6d | 6f 74 65 5f 74 61 62 6c |HERE rem|ote_tabl|
|00005a30| 65 2e 63 6f 6c 75 6d 6e | 31 20 3d 20 6c 6f 63 61 |e.column|1 = loca|
|00005a40| 6c 5f 74 61 62 6c 65 2e | 63 6f 6c 75 6d 6e 5f 31 |l_table.|column_1|
|00005a50| 3b fb 00 03 4a 52 65 6d | 6f 74 65 20 74 61 62 6c |;...JRem|ote tabl|
|00005a60| 65 20 72 65 66 65 72 65 | 6e 63 65 73 20 61 72 65 |e refere|nces are|
|00005a70| 20 73 75 70 70 6f 72 74 | 65 64 20 69 6e 20 46 52 | support|ed in FR|
|00005a80| 4f 4d 20 63 6c 61 75 73 | 65 73 20 6f 66 20 53 45 |OM claus|es of SE|
|00005a90| 4c 45 43 54 20 61 6e 64 | 20 49 4e 53 45 52 54 00 |LECT and| INSERT.|
|00005aa0| 49 49 4e 54 4f fb 2e 03 | 53 45 4c 45 43 54 20 73 |IINTO...|SELECT s|
|00005ab0| 74 61 74 65 6d 65 6e 74 | 73 2c 20 61 6e 64 20 69 |tatement|s, and i|
|00005ac0| 6e 20 74 61 62 6c 65 20 | 71 75 61 6c 69 66 69 65 |n table |qualifie|
|00005ad0| 72 73 20 6f 66 20 63 6f | 6c 75 6d 6e 20 72 65 66 |rs of co|lumn ref|
|00005ae0| 65 72 65 6e 63 65 73 20 | 69 6e 00 11 74 68 65 73 |erences |in..thes|
|00005af0| 65 20 73 74 61 74 65 6d | 65 6e 74 73 2e fb 00 03 |e statem|ents....|
|00005b00| 05 68 6b 79 77 72 64 07 | db 68 6b 79 77 72 64 07 |.hkywrd.|.hkywrd.|
|00005b10| dc 68 6b 79 77 72 64 07 | dd 68 6b 79 77 72 64 07 |.hkywrd.|.hkywrd.|
|00005b20| de 68 6b 79 77 72 64 07 | df 00 1c 64 00 2a fb 00 |.hkywrd.|...d.*..|
|00005b30| 04 05 a1 fb 00 05 0d 64 | 61 74 61 62 61 73 65 20 |.......d|atabase |
|00005b40| 6c 69 6e 6b 00 16 2d 00 | 0c 00 02 00 00 05 ab fb |link..-.|........|
|00005b50| 00 05 07 73 79 6e 6f 6e | 79 6d 00 13 66 00 29 00 |...synon|ym..f.).|
|00005b60| 08 00 00 06 45 fb 00 05 | 04 46 52 4f 4d 00 15 2d |....E...|.FROM..-|
|00005b70| 00 39 00 08 00 00 06 18 | fb 00 05 06 53 45 4c 45 |.9......|....SELE|
|00005b80| 43 54 00 15 2d 00 44 00 | 08 00 00 06 01 fb 00 05 |CT..-.D.|........|
|00005b90| 06 49 4e 53 45 52 54 00 | 09 01 00 00 06 5c fb 00 |.INSERT.|.....\..|
|00005ba0| 03 01 00 09 01 00 00 07 | 08 fb 00 03 01 03 81 00 |........|........|
|00005bb0| 11 00 17 54 72 65 65 2d | 53 74 72 75 63 74 75 72 |...Tree-|Structur|
|00005bc0| 65 64 20 51 75 65 72 69 | 65 73 02 68 63 6e 74 78 |ed Queri|es.hcntx|
|00005bd0| 74 02 51 68 63 6e 74 78 | 74 02 52 00 11 00 47 41 |t.Qhcntx|t.R...GA|
|00005be0| 20 74 72 65 65 2d 73 74 | 72 75 63 74 75 72 65 64 | tree-st|ructured|
|00005bf0| 20 71 75 65 72 79 20 75 | 73 65 73 20 74 68 65 20 | query u|ses the |
|00005c00| 43 4f 4e 4e 45 43 54 20 | 42 59 20 63 6c 61 75 73 |CONNECT |BY claus|
|00005c10| 65 20 74 6f 20 64 69 73 | 70 6c 61 79 20 72 6f 77 |e to dis|play row|
|00005c20| 73 20 69 6e 20 61 00 48 | 68 69 65 72 61 72 63 68 |s in a.H|hierarch|
|00005c30| 69 63 61 6c 20 6f 72 64 | 65 72 2e 20 42 65 67 69 |ical ord|er. Begi|
|00005c40| 6e 6e 69 6e 67 20 77 69 | 74 68 20 74 68 65 20 72 |nning wi|th the r|
|00005c50| 6f 6f 74 20 6e 6f 64 65 | 20 6e 61 6d 65 64 20 69 |oot node| named i|
|00005c60| 6e 20 74 68 65 20 53 54 | 41 52 54 20 57 49 54 48 |n the ST|ART WITH|
|00005c70| 00 3d 63 6c 61 75 73 65 | 2c 20 74 68 65 20 71 75 |.=clause|, the qu|
|00005c80| 65 72 79 20 69 6e 73 70 | 65 63 74 73 20 65 61 63 |ery insp|ects eac|
|00005c90| 68 20 62 72 61 6e 63 68 | 20 63 6f 6e 6e 65 63 74 |h branch| connect|
|00005ca0| 65 64 20 74 6f 20 74 68 | 65 20 72 6f 6f 74 2e fb |ed to th|e root..|
|00005cb0| 00 03 49 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |..IFor e|xample, |
|00005cc0| 74 68 65 20 65 6d 70 20 | 74 61 62 6c 65 20 6c 69 |the emp |table li|
|00005cd0| 73 74 73 20 61 20 6d 61 | 6e 61 67 65 72 20 66 6f |sts a ma|nager fo|
|00005ce0| 72 20 65 61 63 68 20 65 | 6d 70 6c 6f 79 65 65 20 |r each e|mployee |
|00005cf0| 65 78 63 65 70 74 20 4b | 49 4e 47 2c 00 0e 74 68 |except K|ING,..th|
|00005d00| 65 20 70 72 65 73 69 64 | 65 6e 74 3a fb 00 03 29 |e presid|ent:...)|
|00005d10| fb 20 04 4c 65 76 65 6c | 20 31 fb 20 0f 4b 49 4e |. .Level| 1. .KIN|
|00005d20| 47 20 28 74 68 65 20 72 | 6f 6f 74 29 00 34 fb 20 |G (the r|oot).4. |
|00005d30| 10 7c fb 2d 0b 7c fb 2d | 16 7c 00 34 fb 20 10 7c |.|.-.|.-|.|.4. .||
|00005d40| fb 20 0b 7c fb 20 16 7c | 00 36 fb 20 04 4c 65 76 |. .|. .||.6. .Lev|
|00005d50| 65 6c 20 32 fb 20 03 43 | 4c 41 52 4b fb 20 07 4a |el 2. .C|LARK. .J|
|00005d60| 4f 4e 45 53 fb 20 12 42 | 4c 41 4b 45 00 44 fb 20 |ONES. .B|LAKE.D. |
|00005d70| 10 7c fb 20 07 7c fb 2d | 03 7c fb 2d 03 7c fb 20 |.|. .|.-|.|.-.|. |
|00005d80| 05 7c fb 2d 05 7c fb 2d | 06 7c fb 2d 07 7c fb 2d |.|.-.|.-|.|.-.|.-|
|00005d90| 07 7c 00 44 fb 20 10 7c | fb 20 07 7c fb 20 07 7c |.|.D. .||. .|. .||
|00005da0| fb 20 05 7c fb 20 05 7c | fb 20 06 7c fb 20 07 7c |. .|. .||. .|. .||
|00005db0| fb 20 07 7c 00 46 fb 20 | 04 4c 65 76 65 6c 20 33 |. .|.F. |.Level 3|
|00005dc0| fb 20 03 4d 49 4c 4c 45 | 52 20 20 53 43 4f 54 54 |. .MILLE|R SCOTT|
|00005dd0| fb 20 03 46 4f 52 44 20 | 20 41 4c 4c 45 4e 20 20 |. .FORD | ALLEN |
|00005de0| 57 41 52 44 20 20 4d 41 | 52 54 49 4e 20 20 54 55 |WARD MA|RTIN TU|
|00005df0| 52 4e 45 52 20 20 4a 41 | 4d 45 53 00 21 fb 20 18 |RNER JA|MES.!. .|
|00005e00| 7c fb 20 07 7c 00 21 fb | 20 18 7c fb 20 07 7c 00 ||. .|.!.| .|. .|.|
|00005e10| 23 fb 20 04 4c 65 76 65 | 6c 20 34 fb 20 0b 41 44 |#. .Leve|l 4. .AD|
|00005e20| 41 4d 53 fb 20 03 53 4d | 49 54 48 fb 00 03 02 68 |AMS. .SM|ITH....h|
|00005e30| 6b 79 77 72 64 07 e0 68 | 6b 79 77 72 64 07 e1 00 |kywrd..h|kywrd...|
|00005e40| 19 2d 00 21 fb 00 04 06 | 4b fb 00 05 0a 43 4f 4e |.-.!....|K....CON|
|00005e50| 4e 45 43 54 20 42 59 00 | 14 6c 00 04 00 07 00 00 |NECT BY.|.l......|
|00005e60| 04 60 fb 00 05 05 4c 65 | 76 65 6c 00 06 24 74 79 |.`....Le|vel..$ty|
|00005e70| 70 65 00 00 05 00 01 fb | 00 03 0a 00 00 02 fb 00 |pe......|........|
|00005e80| 03 b7 00 00 03 fb 00 03 | e4 00 00 04 00 00 01 5b |........|.......[|
|00005e90| 00 00 05 00 00 02 1e 00 | 74 6f 70 62 61 72 00 01 |........|topbar..|
|00005ea0| 00 01 00 00 02 b3 00 68 | 6d 65 6e 75 63 00 08 00 |.......h|menuc...|
|00005eb0| 01 00 00 02 f9 00 00 02 | 00 00 03 0c 00 00 03 00 |........|........|
|00005ec0| 00 03 23 00 00 04 00 00 | 03 3a 00 00 05 00 00 03 |..#.....|.:......|
|00005ed0| 4d 00 00 06 00 00 03 61 | 00 00 07 00 00 03 77 00 |M......a|......w.|
|00005ee0| 00 08 00 00 03 8d 00 68 | 63 6e 74 78 74 02 52 00 |.......h|cntxt.R.|
|00005ef0| 01 00 00 03 a4 08 63 6e | 74 78 74 6f 66 66 00 02 |......cn|txtoff..|
|00005f00| 00 00 03 af 0b 63 6f 6e | 74 65 78 74 35 37 5f 30 |.....con|text57_0|
|00005f10| 00 03 00 00 03 ba 0b 63 | 6f 6e 74 65 78 74 35 37 |.......c|ontext57|
|00005f20| 5f 31 00 04 00 00 56 12 | 0b 63 6f 6e 74 65 78 74 |_1....V.|.context|
|00005f30| 35 36 5f 30 00 05 00 00 | 56 1d 0b 63 6f 6e 74 65 |56_0....|V..conte|
|00005f40| 78 74 35 36 5f 31 00 06 | 00 00 87 0d 0c 63 6f 6e |xt56_1..|.....con|
|00005f50| 74 65 78 74 31 38 38 5f | 30 00 07 00 00 87 18 0c |text188_|0.......|
|00005f60| 63 6f 6e 74 65 78 74 31 | 38 38 5f 31 00 08 00 00 |context1|88_1....|
|00005f70| 88 79 0a 63 6f 6e 74 65 | 78 74 32 5f 30 00 09 00 |.y.conte|xt2_0...|
|00005f80| 00 88 84 0a 63 6f 6e 74 | 65 78 74 32 5f 31 00 0a |....cont|ext2_1..|
|00005f90| 00 00 8b ef 0a 63 6f 6e | 74 65 78 74 33 5f 30 00 |.....con|text3_0.|
|00005fa0| 0b 00 00 8b fa 0a 63 6f | 6e 74 65 78 74 33 5f 31 |......co|ntext3_1|
|00005fb0| 00 0c 00 00 8e 18 0a 63 | 6f 6e 74 65 78 74 34 5f |.......c|ontext4_|
|00005fc0| 30 00 0d 00 00 8e 23 0a | 63 6f 6e 74 65 78 74 34 |0.....#.|context4|
|00005fd0| 5f 31 00 0e 00 00 91 d3 | 0a 63 6f 6e 74 65 78 74 |_1......|.context|
|00005fe0| 35 5f 30 00 0f 00 00 91 | de 0a 63 6f 6e 74 65 78 |5_0.....|..contex|
|00005ff0| 74 35 5f 31 00 10 00 00 | 93 fe 0a 63 6f 6e 74 65 |t5_1....|...conte|
|00006000| 78 74 36 5f 30 00 11 00 | 00 94 09 0a 63 6f 6e 74 |xt6_0...|....cont|
|00006010| 65 78 74 36 5f 31 00 12 | 00 00 95 f2 0a 63 6f 6e |ext6_1..|.....con|
|00006020| 74 65 78 74 37 5f 30 00 | 13 00 00 95 fd 0a 63 6f |text7_0.|......co|
|00006030| 6e 74 65 78 74 37 5f 31 | 00 14 00 00 97 1e 0a 63 |ntext7_1|.......c|
|00006040| 6f 6e 74 65 78 74 38 5f | 30 00 15 00 00 97 29 0a |ontext8_|0.....).|
|00006050| 63 6f 6e 74 65 78 74 38 | 5f 31 00 16 00 00 99 db |context8|_1......|
|00006060| 0a 63 6f 6e 74 65 78 74 | 39 5f 30 00 17 00 00 99 |.context|9_0.....|
|00006070| e6 0a 63 6f 6e 74 65 78 | 74 39 5f 31 00 18 00 00 |..contex|t9_1....|
|00006080| 9e 56 0b 63 6f 6e 74 65 | 78 74 31 30 5f 30 00 19 |.V.conte|xt10_0..|
|00006090| 00 00 9e 61 0b 63 6f 6e | 74 65 78 74 31 30 5f 31 |...a.con|text10_1|
|000060a0| 00 1a 00 00 a0 70 0b 63 | 6f 6e 74 65 78 74 31 31 |.....p.c|ontext11|
|000060b0| 5f 30 00 1b 00 00 a0 7b | 0b 63 6f 6e 74 65 78 74 |_0.....{|.context|
|000060c0| 31 31 5f 31 00 1c 00 00 | a2 0b 0b 63 6f 6e 74 65 |11_1....|...conte|
|000060d0| 78 74 31 33 5f 30 00 1d | 00 00 a2 16 0b 63 6f 6e |xt13_0..|.....con|
|000060e0| 74 65 78 74 31 33 5f 31 | 00 1e 00 00 a7 04 0b 63 |text13_1|.......c|
|000060f0| 6f 6e 74 65 78 74 31 34 | 5f 31 00 1f 00 00 a8 b9 |ontext14|_1......|
|00006100| 0b 63 6f 6e 74 65 78 74 | 31 35 5f 30 00 20 00 00 |.context|15_0. ..|
|00006110| a8 c4 0b 63 6f 6e 74 65 | 78 74 31 35 5f 31 00 21 |...conte|xt15_1.!|
|00006120| 00 00 aa 5a 0b 63 6f 6e | 74 65 78 74 31 36 5f 30 |...Z.con|text16_0|
|00006130| 00 22 00 00 aa 65 0b 63 | 6f 6e 74 65 78 74 31 36 |."...e.c|ontext16|
|00006140| 5f 31 00 23 00 00 ab c4 | 0b 63 6f 6e 74 65 78 74 |_1.#....|.context|
|00006150| 31 37 5f 30 00 24 00 00 | ab cf 0b 63 6f 6e 74 65 |17_0.$..|...conte|
|00006160| 78 74 31 37 5f 31 00 25 | 00 00 ae 05 0b 63 6f 6e |xt17_1.%|.....con|
|00006170| 74 65 78 74 31 38 5f 30 | 00 26 00 00 ae 10 0b 63 |text18_0|.&.....c|
|00006180| 6f 6e 74 65 78 74 31 38 | 5f 31 00 27 00 00 af 4c |ontext18|_1.'...L|
|00006190| 0b 63 6f 6e 74 65 78 74 | 31 39 5f 30 00 28 00 00 |.context|19_0.(..|
|000061a0| af 57 0b 63 6f 6e 74 65 | 78 74 31 39 5f 31 00 29 |.W.conte|xt19_1.)|
|000061b0| 00 00 b1 0e 0b 63 6f 6e | 74 65 78 74 32 30 5f 30 |.....con|text20_0|
|000061c0| 00 2a 00 00 b1 19 0b 63 | 6f 6e 74 65 78 74 32 30 |.*.....c|ontext20|
|000061d0| 5f 31 00 2b 00 00 b2 2b | 0b 63 6f 6e 74 65 78 74 |_1.+...+|.context|
|000061e0| 32 31 5f 30 00 2c 00 00 | b2 36 0b 63 6f 6e 74 65 |21_0.,..|.6.conte|
|000061f0| 78 74 32 31 5f 31 00 2d | 00 00 b3 76 0b 63 6f 6e |xt21_1.-|...v.con|
|00006200| 74 65 78 74 32 32 5f 30 | 00 2e 00 00 b3 81 0b 63 |text22_0|.......c|
|00006210| 6f 6e 74 65 78 74 32 32 | 5f 31 00 2f 00 00 b4 7e |ontext22|_1./...~|
|00006220| 0b 63 6f 6e 74 65 78 74 | 32 33 5f 30 00 30 00 00 |.context|23_0.0..|
|00006230| b4 89 0b 63 6f 6e 74 65 | 78 74 32 33 5f 31 00 31 |...conte|xt23_1.1|
|00006240| 00 00 b5 e6 0b 63 6f 6e | 74 65 78 74 32 34 5f 30 |.....con|text24_0|
|00006250| 00 32 00 00 b5 f1 0b 63 | 6f 6e 74 65 78 74 32 34 |.2.....c|ontext24|
|00006260| 5f 31 00 33 00 00 b7 30 | 0b 63 6f 6e 74 65 78 74 |_1.3...0|.context|
|00006270| 32 35 5f 30 00 34 00 00 | b7 3b 0b 63 6f 6e 74 65 |25_0.4..|.;.conte|
|00006280| 78 74 32 35 5f 31 00 35 | 00 00 b8 68 0b 63 6f 6e |xt25_1.5|...h.con|
|00006290| 74 65 78 74 32 36 5f 30 | 00 36 00 00 b8 73 0b 63 |text26_0|.6...s.c|
|000062a0| 6f 6e 74 65 78 74 32 36 | 5f 31 00 37 00 00 b9 64 |ontext26|_1.7...d|
|000062b0| 0b 63 6f 6e 74 65 78 74 | 32 37 5f 30 00 38 00 00 |.context|27_0.8..|
|000062c0| b9 6f 0b 63 6f 6e 74 65 | 78 74 32 37 5f 31 00 39 |.o.conte|xt27_1.9|
|000062d0| 00 00 b9 ed 0b 63 6f 6e | 74 65 78 74 32 38 5f 30 |.....con|text28_0|
|000062e0| 00 3a 00 00 b9 f8 0b 63 | 6f 6e 74 65 78 74 32 38 |.:.....c|ontext28|
|000062f0| 5f 31 00 3b 00 00 ba ba | 0b 63 6f 6e 74 65 78 74 |_1.;....|.context|
|00006300| 32 39 5f 30 00 3c 00 00 | ba c5 0b 63 6f 6e 74 65 |29_0.<..|...conte|
|00006310| 78 74 32 39 5f 31 00 3d | 00 00 bc 80 0b 63 6f 6e |xt29_1.=|.....con|
|00006320| 74 65 78 74 33 30 5f 30 | 00 3e 00 00 bc 8b 0b 63 |text30_0|.>.....c|
|00006330| 6f 6e 74 65 78 74 33 30 | 5f 31 00 3f 00 00 bd ec |ontext30|_1.?....|
|00006340| 0b 63 6f 6e 74 65 78 74 | 33 31 5f 30 00 40 00 00 |.context|31_0.@..|
|00006350| bd f7 0b 63 6f 6e 74 65 | 78 74 33 31 5f 31 00 41 |...conte|xt31_1.A|
|00006360| 00 00 be 95 0b 63 6f 6e | 74 65 78 74 33 32 5f 30 |.....con|text32_0|
|00006370| 00 42 00 00 be a0 0b 63 | 6f 6e 74 65 78 74 33 32 |.B.....c|ontext32|
|00006380| 5f 31 00 43 00 00 bf 18 | 0b 63 6f 6e 74 65 78 74 |_1.C....|.context|
|00006390| 33 33 5f 30 00 44 00 00 | bf 23 0b 63 6f 6e 74 65 |33_0.D..|.#.conte|
|000063a0| 78 74 33 33 5f 31 00 45 | 00 00 bf d8 0b 63 6f 6e |xt33_1.E|.....con|
|000063b0| 74 65 78 74 33 34 5f 30 | 00 46 00 00 bf e3 0b 63 |text34_0|.F.....c|
|000063c0| 6f 6e 74 65 78 74 33 34 | 5f 31 00 47 00 00 c0 af |ontext34|_1.G....|
|000063d0| 0b 63 6f 6e 74 65 78 74 | 33 35 5f 30 00 48 00 00 |.context|35_0.H..|
|000063e0| c0 ba 0b 63 6f 6e 74 65 | 78 74 33 35 5f 31 00 49 |...conte|xt35_1.I|
|000063f0| 00 00 c1 a1 0b 63 6f 6e | 74 65 78 74 33 36 5f 30 |.....con|text36_0|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.