ๆญฏPLSQL10.PDF

Similar documents
13์ฃผ-14์ฃผproc.PDF

ๆญฏ320.PDF

ยฐรธยฑรขยพรยฑรขยฑรข

RDB๊ฐœ์š”.ppt

SRC PLUS ์ œ์–ด๊ธฐ MANUAL


๋ชฉ์ฐจ BUG ๋ฌธ๋ฒ•์—๋งž์ง€์•Š๋Š”์งˆ์˜๋ฌธ์ˆ˜ํ–‰์‹œ, ์—๋Ÿฌ๋ฉ”์‹œ์ง€์—์งˆ์˜๋ฌธ์˜์ผ๋ถ€๋งŒ๋ณด์—ฌ์ฃผ๋Š”๋ฌธ์ œ๋ฅผ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค... 3 BUG ROUND, TRUNC ํ•จ์ˆ˜์—์„œ DATE ํฌ๋งท IW ๋ฅผ์ถ”๊ฐ€์ง€์›ํ•ฉ๋‹ˆ๋‹ค... 5 BUG ROLLUP/CUBE ์ ˆ์„ํฌํ•จํ•˜๋Š”์งˆ์˜๋Š” SUBQUE

90

NSK-ร‡ยฅรรถ_ยบยปยปรง

2 A A Cs A C C A A B A B 15 A C 30 A B A C B. 1m 1m A. 1 C.1m P k A B u k GPS GPS GPS GPS 4 2

,,,,,, (41) ( e f f e c t ), ( c u r r e n t ) ( p o t e n t i a l difference),, ( r e s i s t a n c e ) 2,,,,,,,, (41), (42) (42) ( 41) (Ohm s law),

105รˆยฃ4fลก

untitled

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

์—ฐ๋ฒˆ ๋™๋ช… ์œ ํ˜•๋ณ„ ์‹๋‹น๋ช… ์ฃผ์†Œ1 ์ฃผ์†Œ2 ๋Œ€ํ‘œ์ž ์ „ํ™”๋ฒˆํ˜ธ 2.6 (ํ† ) ์—ฐํœด๊ธฐ๊ฐ„ ์šด์˜์—ฌ๋ถ€ (O.X๋กœ ํ‘œ๊ธฐ) 2.7 (์ผ) 2.8 (์›”) 2.9 (ํ™”) 2.10 (์ˆ˜) 12 ๊ฑด๊ตญ๋™ ๋ถ„์‹ ํ”ผ์ž๊ฐ€๊ธฐ๊ฐ€๋ง‰ํ˜€ ๊ด‘์ฃผ๊ด‘์—ญ์‹œ ๋ถ๊ตฌ ์šฉ๋‘๋™ (์˜์•”๋งˆํŠธ ๋งž์€ํŽธ ๋†ํ˜‘ ๊ฑด๋ฌผ 1 ์ธต)

๋ชฉ์ฐจ BUG offline replicator ์—์„œ์œ ํšจํ•˜์ง€์•Š์€๋กœ๊ทธ๋ฅผ์ฝ์„๊ฒฝ์šฐ๋น„์ •์ƒ์ข…๋ฃŒํ• ์ˆ˜์žˆ๋‹ค... 3 BUG ๊ฐ partition ์ด์„œ๋กœ๋‹ค๋ฅธ tablespace ๋ฅผ๊ฐ€์ง€๊ณ , column type ์ด CLOB ์ด๋ฉฐ, ํ•ด๋‹น table ์„ truncate

Windows ์‹œ์Šคํ…œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ œ3ํŒ

Microsoft Word - 05_SUBPROGRAM.doc

9

untitled

DCR-HC15

hapter_ i i 8 // // 8 8 J i 9K i? 9 i > A i A i 8 8 KW i i i W hapter_ a x y x y x y a /()/()=[W] b a b // // // x x L A r L A A L L A G // // // // /

๋‹จ๋‹ตํ˜• (26 ํšŒ๊ธฐ์ถœ๋ฌธ์ œ ) 1. ์•„๋ž˜์™€๊ฐ™์€ํ…Œ์ด๋ธ”์ด์žˆ์„๋•Œ์•„๋ž˜์˜ SQL ๊ฒฐ๊ณผ์—๋Œ€ํ•ด์„œ Oracle, SQL Server ์ˆœ์„œ๋กœ์ ์œผ์‹œ์˜ค TAB1 COL1 CHAR(10) COL2 CHAR(10) INSERT INTO TAB1 VALUES ('1',''); INSERT INT

8, Aug, 08, 008

hwp

( )๋ฐ•์šฉ์ฃผ97.PDF

ๆญฏsql_tuning2

็™พ ๋ˆผ์‹  ์‹œ " ๊ฐ€.์ธ๋„์˜ ๋Œ€ํ‘œ์  ์„ฌ์œ ,ํŒจ์…˜ ์ œํ’ˆ l) ์นดํŽซ ๋ฉด๊ณผ ๋น„๋‹จ์œผ๋กœ ๋งŒ๋“  ์นดํŽซ์€ ์ˆ˜์„ธ๊ธฐ ๋™์•ˆ ์ธ๊ธฐ์žˆ๋Š” ์ˆ˜์ถœ ํ’ˆ์˜ฅ์ด์—ˆ๋‹ค.๋ฌด๊ตด์‹œ๋Œ€์˜ ๋”” ์ž์ธ ๊ฐ๊ฐ์œผ๋กœ ์™„์„ฑ๋œ ํ”Œ๋Ÿฌ์‹œ ๋น„๋‹จ์นดํŽซ์€ ์˜ค๋Š˜๋‚ ๊นŒ์ง€ ๊ด€๊ด‘๊ฐ์—๊ฒŒ ๋งŽ์€ ์‚ฌ๋ž‘์„ ๋ฐ›๋Š” ์ œํ’ˆ์ด๋‹ค.์ธ๋„์‚ฐ ์ˆ˜์ง ๋งค๋“ญ ์–‘ํƒ„์ž ๋‘๋ฆฌ(Dur ie


PRO1_09E [์ฝ๊ธฐ ์ „์šฉ]

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ ADO 21์ผ ์™„์„ฑ

์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ C++

Bchvvhv[vhvvhvvhchvvhvvhvvhvvhvvgvvgvv}vvvgvvhvvhvvvhvvhvvhvvvbbhvvhvvvgvvgvvhvvhvvhv}hv,.. Bchvvhv[vhvvhvvhvvhvvbbhvvhvvhvvvhvvhvvgvvgvv}vvgvvhvvvhvv

ๆญฏFFF01379.PDF

์ œ6์กฐ(์ „์ €ํ•ญ ์‚ฐ์ •) ๋ถ€์œ ์‹ ํ•ด์ƒ๊ตฌ์กฐ๋ฌผ์˜ ์ „์ €ํ•ญ(R)์€ ๋‹ค์Œ ์‹์— ์˜ํ•˜์—ฌ ์‚ฐ์ •ํ•œ๋‹ค. R = (kg) ์ด ์‹์—์„œ Ra๋Š” ๋‹ค์Œ ์‚ฐ์‹์— ์˜ํ•œ ๊ฐ’ Ra = Ka Aa Va (kg) ์ด ์‹์—์„œ Ka: (ํšก๋ฐฉํ–ฅ ํ’์••๊ณ„์ˆ˜) (kg sec /m ) Aa : ํ˜์ˆ˜์„  ์ƒ๋ถ€

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r


้ฎ๋šฎโ”ฐ๏งŽ๋ถพ๋ฑ??๏งกโ‘ค๋‚ฏ

587.eps

์˜ค๋ผํด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค 10g ํ•ต์‹ฌ ์š”์•ฝ ๋…ธํŠธ

h99-37.PDF

1์ฐจ๋‚ด์ง€

ๆญฏ๋ฉ”๋‰ด์–ผv2.04.doc

untitled

10.ppt

<C3CA3520B0FAC7D0B1B3BBE7BFEB202E687770>

I ๋ฌธํ•™๊ณผ ์šฐ๋ฆฌ ์‚ฌํšŒ ๋ˆˆ ์€ ๋‹ค๊ฐ€์˜ค๋Š” ๊ณ„์ ˆ์ธ ๋ด„์˜ ์ƒ๋ช…๋ ฅ๊ณผ ์—ฐ๊ฒฐ๋˜์–ด ์ž‘ํ’ˆ ์ „์ฒด์˜ ๋ถ„์œ„ ๊ธฐ๋ฅผ ์ฃผ๋„ํ•˜๊ณ  ์žˆ๋‹ค. 1. ๋ฌธํ•™๊ณผ ์ธ์ ‘ ๋ถ„์•ผ ๋ฐ”ํƒ• ํ•™์Šต ํ™•์ธ ๋ฌธ์ œ ๋ณธ๋ฌธ 009์ชฝ 01 4 ๋ฌธํ•™์€ ์Œ์•…, ๋ฏธ์ˆ  ๋“ฑ๊ณผ ๊ฐ™์ด ์˜ˆ์ˆ ์˜ ํ•œ ๊ฐˆ๋ž˜๋กœ, ๋‹ค๋ฅธ ์˜ˆ์ˆ  ๊ฐˆ๋ž˜์™€ ๋‹ฌ๋ฆฌ ์–ธ

AD AD 8-0 / A A-2 / A A A-5 / A A T-T / Q

13 2 ( 25 ) Korean J Med Hist Dec 2004 ISSN X * ( ) ( ) ( ). 1) ( ) ( ) ( ) ( ) ( ) 2) ( ) 3) 1990 ( ) 4) * 1) ( ) C

HHIC-Phil Subic Apartment Talk about ๋งˆ์Œ์— ๋ณด์•ฝ ๋น„๋ก ์—„์ง€์กฑ์€ ์•„๋‹ˆ๋”๋ผ๋„ ์–ด๋ ค์šด ์ผ์€ ์•„๋‹ˆ์ฃ . ํ™”๋ คํ•œ ์ด๋ชจํ‹ฐ์ฝ˜ ์ƒ๋žตํ•ด๋„ ์ƒ๊ด€์—†์–ด์š” ๋‹ด๋ฐฐ ํ•œ ๋Œ€๋ฅผ ํ”ผ์›Œ๋ฌผ ๋•Œ ์žํŒ๊ธฐ ์ปคํ”ผ๋ฅผ ๋ฝ‘์•„๋“ค ๋•Œ ๋ฌธ์ž ํ•˜๋‚˜ํ•˜๋‚˜์— ์—ฌ๋Ÿฌ๋ถ„์˜ ์ง„์‹ฌ์„ ๋‹ด์•„๋ณด์„ธ์š”. ๊ฐ๋™์ด๊ฐ€๊ณ ๋ฏธ์†Œ

. "" "",.... :...,,....,.. :..,,,..,,...,.... 2

๋…ผ๋ฌธ์ˆ˜์ •๋ณธ.PDF

ๆญฏIC-706.PDF


KARAAUTO_4ยฟรน.qxd-ร€รŒร†รฅ.ps, page Normalize

Microsoft Word - PLSQL.doc

I 154

dnu.pdf

Microsoft Word - [Unioneinc] ํŠน์ •์ปฌ๋Ÿผ์˜ ํ†ต๊ณ„์ •๋ณด ๊ฐฑ์‹ _ _ldh.doc

Microsoft PowerPoint - ch10 - ์ด์ง„ํŠธ๋ฆฌ, AVL ํŠธ๋ฆฌ, ํŠธ๋ฆฌ ์‘์šฉ pm0600

AC-A-C1

USER GUIDE

. PC DP-1VR P15 1ch 1 Input Tool 4ch RS-232C RS-232C. Input Tool P14 MUX-10F P16 MeasureReport P21 GO/NG 2 MeasurLink Real-Time P19 MeasurLink STATMea

#KM560

HWP Document

XG-P20XD

ๆญฏ๋ชฉ์ฐจ88.PDF

ๆญฏ2800.PDF

Spring Boot/JDBC JdbcTemplate/CRUD ์˜ˆ์ œ

ๆญฏํ‘œ์ง€_ํ†ตํ•ฉ_.PDF

B _01_M_Korea.indb

ELECTRICAL PARTS LIST (CA-6215) Ref No. Part No. Description Value Qty AMP B'D ( B ) C1406 C CAP NPP POLY 152J 2J 152P 2 C140

Jerry Held

DocsPin_Korean.pages


Korean 654x Quick Start Guide

#KM-235(110222)

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ฮถ ฯ‰ n (rad/sec) 2 ( ฮถ < 1), 1 (ฮถ = 1), ( ) 1

0.1-6

์ •๋ด‰์ˆ˜.PDF

(Humphery Kim) RAD Studio : h=p://tech.devgear.co.kr/ : h=p://blog.hjf.pe.kr/ Facebook : h=p://d.com/hjfactory :

์•Œ์•„ ๋‘˜ ์‚ฌํ•ญ ์•„์ด์˜ค๋“œ ์ œ์กฐ์‚ฌ๋Š” ๋ณธ ๊ธฐ๊ธฐ์— ํ•˜๋“œ๋””์Šคํฌ๋ฅผ ํฌํ•จํ•˜์—ฌ ์ถœ๊ณ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ•˜๋“œ๋””์Šคํฌ์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒฝ์šฐ, ๊ตฌ๋งค์ฒ˜ ๋˜๋Š” ํ•ด๋‹น ํ•˜๋“œ๋””์Šคํฌ ์„œ๋น„ ์Šค์„ผํ„ฐ์— ๋ฌธ์˜ ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ์ •ํ•ด์ง„ ์šฉ๋„ ์™ธ์˜ ์‚ฌ์šฉ์œผ๋กœ ๋ฐœ์ƒํ•œ ๋ฌธ์ œ์— ๋Œ€ํ•ด์„œ, ๋‹น์‚ฌ๋Š” ์–ด๋– ํ•œ ์ฑ…์ž„๋„ ์ง€์ง€

์™„์„ฑ09E02๋ฐ•์€์ˆ™.PDF

๊ฐ•์˜10

5-1 Cabinet Assembly W00 W48 W009 H00 P00 W48 M0 C05 P00 P00 W7 W44 W00 P05 A00 W009 C00 P007P P007F 5- This Document can not be used without Samsung

ๆญฏ์ œ7๊ถŒ1ํ˜ธ(์ตœ์ข…ํŽธ์ง‘).PDF

ALTIBASE HDB Patch Notes

รยฆ27ร€รฅ

แ„Œแ…ฆ20แ„’แ…ฌ_แ„’แ…ขแ„แ…ตแ†ผแ„‡แ…กแ†ผแ„Œแ…ตแ„‹แ…ฏแ„แ…ณแ„‰แ…ฃแ†ธ_(แ„‹แ…ตแ„Œแ…ขแ„‰แ…ฅแ†จ)

Beginning Linux Programming ์ œ3ํŒ

๋ฆฌ์ฝœ ๋ชจ๋“œ 1. ๋ฅผ ๋ˆŒ๋Ÿฌ ํฌ๋กœ๋…ธ๊ทธ๋ž˜ํ”„๊ฐ€ ์ค‘์ง€ํ–ˆ์„ ๋•Œ์˜ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๋ฆฌ์ฝœํ•˜์‹ญ์‹œ์˜ค. 2. ๋ฅผ ๋ˆŒ๋Ÿฌ ๋‹ค์Œ ๋žฉ์„ ๋ณด์‹ญ์‹œ์˜ค. 3. ๋˜๋Š” ๋ฅผ ๋ˆŒ๋Ÿฌ ๋ฆฌ์ฝœ ๋ชจ๋“œ๋ฅผ ์ข…๋ฃŒํ•˜๊ณ  ํฌ๋กœ๋…ธ๊ทธ๋ž˜ํ”„ ๋ชจ๋“œ๋กœ ๋Œ์•„๊ฐ€์‹ญ์‹œ์˜ค. ํƒ€์ด๋จธ ๋ชจ๋“œ 1. ๋ฅผ ๋ˆŒ๋Ÿฌ ํƒ€์ด๋จธ ๋ชจ๋“œ๋กœ ์ „ํ™˜ํ•˜์‹ญ์‹œ์˜ค. 2. ๋ฅผ ๋ˆŒ๋Ÿฌ ํƒ€์ด๋จธ๋ฅผ ์‹œ

ๆญฏ6์›”.PDF


์˜ˆ์ œ์†Œ์Šค๋Š” ์—์„œ๋‹ค์šด๋กœ๋“œํ•˜์—ฌ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ํˆด๋ฐ”์˜ [ ์ƒˆ์ฟผ๋ฆฌ ]( ์—์•„๋ž˜์˜์†Œ์Šค๋ฅผ์ž…๋ ฅํ•œ๋‹ค. ์ž…๋ ฅํ›„์—๋Š”์•ž์œผ๋กœ์‹ค์Šต์„์œ„ํ•ด์„œ์ €์žฅํ•ด๋‘”๋‹ค. -- ์‹ค์Šต์—ํ•„์š”ํ•œ Madang DB ์™€ COMPANY DB ๋ฅผ๋ชจ๋‘์ƒ์„ฑํ•œ๋‹ค. -- ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์ƒ์„ฑ US

ๆญฏ์ž๋ฃŒ์ง‘.PDF

ESQL/C

SIGPLwinterschool2012

Transcription:

10 - SQL*Pl u s Pl / SQL - SQL*P lus 10-1

1 0.1 PL/ SQL SQL*Pl u s. SQL*P lus 10-2

1 0.2 S QL* Pl u s PL/ S QL SQL*Pl u s, Pl / SQL. - PL/ SQL (i npu t ), (s t or e ), (r un). - PL/ SQL s cr i pt,,. - PL/ SQL b i nd va r i ab l e s. - PL/ SQL subp r ogr am. SQL*P lus 10-3

1 0.3 An o ny mo u s Bl o c k PL/ SQL DECLARE, BEGI N. SQL*Pl u s p r omp t (SQL> ) SOL*Pl u s. - SQL bu f f e r ( ) - I NPUT mode. - s emi col on s (SOL ). SOL*Pl u s PL/ SQL, (b l ock l ab l e ). PL/ SQL. p e r i od (.). SOL bu f f e r. PL/ SQL Sc r i p t f i l e. SQL> SAVE f i l en ame Sc r i p t f i l e SQL*Pl u s l i n e e d i t or. SQL> SAVE f i l en ame REPLACE SQL*P lus 10-4

1 0.4 An o ny mo u s Bl o c k PL/ SQL, Pe r i od (.) s l a s h (/ ), SQL bu f f e r,. SQL bu f f e r. SQL> RUN SQL> / SQL*Pl u s p r omt e. SQL*P lus 10-5

1 0.5 S c r i p t e d i t e r SQL*Pl u s s t a t emen t s, PL/ SQL b l oc k s, s ubp r ogr ams, (and/ or ) p a c ka ge s s c r i p t PL/ SQL SQL*Pl u s. CLEAR BREAKS CLEAR COLUMNS COLUMN ENAME HEADI NG Name TTI TLE 'CLERI CAL STAFF' DECLARE av g_ s a l NUMBER(7,2); BEGI N SELECT AVG(s a l ) I NTO av g_ s a l FROM emp ; I F av g_ s a l < 1500 THEN UPDATE emp SET s a l = s a l * 1.05 WHERE j ob = 'CLERK' ; END I F; END; / SELECT ENAME, SAL FROM EMP WHERE J OB = 'CLERK' ; - CLEAR. - COLUMN ENAME he adi ng Name. - TTI TLE t i t l e. - SQL*Pl u s s emi col on (;). PL/ SQL Sl a sh (/ ). SQL*P lus 10-6

1 0.6 S c r i p t Sc r i p t SQL> START f i l en ame SQL> @ f i l en ame (PL/ S QL S QL *Pl us S u b s t i t u t e Va r i a b l e ) - SQL*Pl u s PL/ SQL, SQL*Pl u s. - SQL*Pl u s n um Pr ompt. SQL> BEGI N 2 FOR i I N 1..&num LOOP...... 8 END; 9 / En t e r v a l u e f or mun : SQL*P lus 10-7

1 0.7 St ored Subprogram, Package, Tr i gger PL/ SQL s ubp r ogr ams, p a c ka ge s, t r i gge r s, da t ab a s e, SQL. - CREATE FUNCTI ON - CREATE PACKAGE - CREATE PACKAGE BODY - CREATE PROCEDURE - CREATE TRI GGER, SQL*Pl us SQL bu f f er, I NPUT mode. PL/ SQL pr ocedur e, s l ash (/ ) dat abas e. SQL> CREATE PROCEDURE c r e a t e_ dep t (n ew_ name CHAR, 2 n ew_ l oc CHAR) AS 3 BEGI N 4 I NSERT I NTO dep t 5 VALUES (dep t n o_ s e q.nextval, n ew_ name, n ew_ l oc ); 6 END c r e a t e_ dep t ; 7 / Pr oc e du r e c r e a t e d SQL*Pl us Subp r ogr am, p ackage, t r i gger, SQL*Pl us SHOW ERRORS. SQL> SHOW ERRORS SQL*P lus 10-8

1 0.8.1 Bi n d Va r i a b l e s - (Bi n d v a r i a b l e s?) - SQL*Pl u s v ar i ab l e. - PL/ SQL p r ogr ams. PL/ SQL pr ogr am Var i ab l e. - SQL*Pl u s PL/ SQL. - SQL*Pl u s. (Bi n d v a r i a b l e ) SQL*Pl us command VARI ABLE. NUMBER t ype va i r ab l e. VARI ABLE r e t u r n_ c ode NUMBER ( ) PL/ SQL p r ogr am v a r i ab l e b i nd v a r i ab l e,. (PL/ S QL ) b i nd v a r i ab l e c o l on (:). :r e t u r n_ c ode := 0; I F c r e d i t _ ch e c k_ ok (a c c t _ n o) THEN :r e t u r n_ c ode := 1; END I F; (S QL *Pl us ) PRI NT. SQL> PRI NT r e t u r en_ c ode RETURN_ CODE - - - - - - - - - - - - - 1 SQL*P lus 10-9

1 0.8.2 Bi n d Va r i a b l e s - ( ) Sc r i p t REFCURSOR t yp e b i nd v a r i ab l e.(sql*pl us dat at ype REFCURSOR cur s or var i ab l e ) SQL*Pl us command SET AUTOPRI NT ON. CREATE PACKAGE emp_ da t e AS TYPE Emp Re ctyp I S RECORD ( emp_ i d NUMBER(4) emp_ nma e CHAR(10) j ob_ t i t l e CHAR(9) dep t _ name CHAR(14) d ep t _ l oc CHAR(13)); TYPE Emp Cu r Typ I S REF CURSOR RETURN Emp Re ctyp ; PROCEDURE ge t _ s t a f f (dep t _ n o I N NUMBER, emp_ cv I N OUT Emp Cu r Typ ); END; / CREATE PACKAGE BODY emp_ da t e AS PROCEDURE ge t _ s t a f f (dep t _ n o I N NUMBER, emp_ cv I N OUT) Emp Cu r Typ ) I S BEGI N OPEN emp_ cv FOR SELECT empn o, ename, j ob, dname, l oc FROM emp, dep t WHERE emp.dep t n o = dep t _ n o AND emp.dep t n o = dep t.dep t n o ORDER BY empn o ; END; END; / COLUMN EMPNO HEADI NG Numb e r COLUMN ENAME HEADI NG Name COLUMN J OB HEADI NG J obti t l e COLUMN DNAME HEADI NG Dep a r t men t COLUMN LOC HEADI NG Loc a t i on SET AUTOPRI NT ON VARI ABLE cv RECURSOR EXECUTE emp_ da t e.ge t _ s t a f f (20, :cv ) SQL*Plus PL/ SQL 10-10

1 0.9 S t o r e d s u b p r o g r a ms SQL*Pl u s l oc a l r emot e da t ab a s e (s t anda l on e p a c ka ge ) s ubp r ogr ams. l oc a l. s t anda l on e p r oc e du r e cr e a t e_ dep t SQL> EXECUTE c r e a t e_ dep t ('ADVERTI SI NG', 'NEW YOUK') PL/ SQL. SQL> BEGI N c r e a t e_ dep t ('ADVERTI SI NG', 'NEW YOUK'); END; da t ab a s e l i nk n e wy or k da t ab a s e r a i s e_ s a l a r y p r oc e du r e s SQL> EXECUTE r a i s e_ s a l a r y @n ewy or k (7499, 1500) - dat aba s e s ynonyms. SQL*Plus PL/ SQL 10-11

1 0.1 0 Ou t p u t, PL/ SQL I / O. DBMS_ OUPUT ( 7 ) p a c ka ge PL/ SQL s ubp r ogr ams Ou t pu t. debu g. (p u t _ l i n e Pr o c e d ur e & S E T S ER VEROUTP UT ON) p u t _ l i n e Pr oc e du r e i n f or ma t i on ou t pu t. SQL*Pl u s. c ommand SET SERVEROUTPUT ON St or e d p r oc e du r e CREATE PROCEDURE c a l c_ p a y r ol l (p a y r ol l I N OUT REAL) AS CURSOR c1 I S SELECT s a l,c omm FROM emp ; BEGI N p a y r ol l := 0; FOR c l r e c I N C1 l oop C1REC.COMM := NVL(c l r e c.c omm, 0); p a y r ol l := p a y r ol l + c1r e c.s a l + c1r e c.c omm; END LOOP; / * Debu g. */ dbms _ ou t pu t.pu t _ l i n e ('p a y r ol l : ' TO_ CHAR(p a y r ol l )); END c a l c_ p a y r ol l ; p r oc edu r e p ay r ol l. SQL> SET SERVEROUTPUT ON SQL> VARI ABLE num NUMBER SQL> EXECUTE c a l c_ p ay r o l l (:num) SQL*Plus PL/ SQL 10-12