일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- Quartz
- Windows 10
- web.xml
- resource
- Eclipse
- IntelliJ
- maVen
- import
- 줄바꿈 문자
- JavaScript
- xargs
- port
- 네트워크
- 단축키
- netsh
- profile
- bash
- plugin
- GIT
- tomcat
- Windows
- ssh
- grep
- context
- find
- lsof
- vscode
- Mac
- Source
- VirtualBox
- Today
- Total
목록DB/PLSQL (5)
develog
DECLARE TYPE T_LIST IS TABLE OF VARCHAR2(100); V_LIST T_LIST; P_STR VARCHAR2(100); FUNCTION FN_SPLIT(P_STR VARCHAR2, P_DELIMITER VARCHAR2 DEFAULT ',') RETURN T_LIST IS V_STR VARCHAR2(100); V_IDX NUMBER; V_ITEM VARCHAR2(100); V_LIST T_LIST; BEGIN V_STR := P_STR; V_LIST := T_LIST(); WHILE TRUE LOOP IF V_STR IS NULL THEN V_LIST.EXTEND; V_LIST(V_LIST.COUNT) := ''; EXIT; END IF; V_IDX := INSTR(V_STR,..
DECLARE TYPE T_LIST IS TABLE OF VARCHAR2(50); TYPE T_LIST2 IS TABLE OF T_LIST; V_LIST T_LIST2; BEGIN V_LIST := T_LIST2( T_LIST('11', '12', '13'), T_LIST('21', '22', '23'), T_LIST('31', '32', '33') ); FOR I IN 1..V_LIST.COUNT LOOP FOR J IN 1..V_LIST(I).COUNT LOOP DBMS_OUTPUT.PUT(V_LIST(I)(J) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(''); END LOOP; END;
DECLARE V_RET VARCHAR2(100);BEGIN FOR I IN 1..10 LOOP V_RET := DBMS_RANDOM.VALUE(1, 10); DBMS_OUTPUT.PUT_LINE(V_RET); END LOOP;END; // output8.9839078322667001170456974268916958057.851388518184581971599266112831883860421.157766466102041956401705763364660090826.894532276694845208644974061237389197652.924221136847810217187949668093751930521.533997361421105739929250368540803519238.09751621393351335..
DECLARE V_SQL VARCHAR2(512); V_CURSOR NUMBER; V_EXECUTED NUMBER; V_COL1 TB_TEMP.COL1%TYPE; V_COL2 TB_TEMP.COL2%TYPE; V_COL3 TB_TEMP.COL3%TYPE; BEGIN V_SQL := ' SELECT COL1, COL2, COL3 FROM TB_TEMP WHERE COL4 = :1 AND COL5 = :2 '; --1. 커서 오픈 V_CURSOR := DBMS_SQL.OPEN_CURSOR; --2. SQL 파싱 DBMS_SQL.PARSE(V_CURSOR, V_SQL, DBMS_SQL.NATIVE); --3. 변수 바인딩 DBMS_SQL.BIND_VARIABLE(V_CURSOR, '1', 'AAA'); DBM..
DECLARE--변수 선언 BEGIN--실행 부분 EXCEPTION--예외 처리 END;