WEB TIP

·WEB TIP/Oracle
sql>variable jobno number; sql>begin 2 sys.dbms_job.submit(:jobno, 'SP이름;', sysdate, 'TRUNC(SYSDATE) + 1', false); 3 End; 4 / sql>print jobno sql>exec dbms_job.run(21); sql>commit; 잡실행여부확인 sql>col what format a20 sql>select what, job, next_date, next_sec, failures, broken from user_jobs;잡강제실행 sql>exec dbms_job.run(21); 잡 Disable sql>exec dbms_job.broken(21, true); 잡 삭제 sql>exec dbms_job.remove(2..
·WEB TIP/Oracle
정해진 날짜의 모든 날짜 구하기 SELECT ROWNUM, TO_DATE('20060425', 'YYYYMMDD') + (ROWNUM-1) FROM DICTIONARY WHERE ROWNUM BETWEEN 1 AND 15 SELECT ROWNUM, TO_DATE('20060425','YYYY-MM-DD')+(LEVEL-1) AS R_DT FROM DUAL CONNECT BY LEVEL
·WEB TIP/Oracle
SELECT X.RES_NO, (NM_1||'|'||NM_2||'|'||NM_3||'|'||NM_4||'|'||NM_5||'|'||NM_6||'|'||NM_7||'|'||NM_8||'|'||NM_9||'|'||NM_10) AS ALL_NM FROM ( SELECT RES_NO , MAX(CASE SEQ WHEN 1 THEN B.DELI_KR_NM END) NM_1 , MAX(CASE SEQ WHEN 2 THEN B.DELI_KR_NM END) NM_2 , MAX(CASE SEQ WHEN 3 THEN B.DELI_KR_NM END) NM_3 , MAX(CASE SEQ WHEN 4 THEN B.DELI_KR_NM END) NM_4 , MAX(CASE SEQ WHEN 5 THEN B.DELI_KR_NM END..
·WEB TIP/Oracle
TO_CHAR(칼럼명, 'YYYY-MM-DD HH24:MI') DT 원하는 형태로...
·WEB TIP/Oracle
DECLARE i INTEGER; BEGIN FOR I IN 1..32 LOOP INSERT INTO 테이블명 (컬럼명) VALUES (컬럼값); END LOOP; END;
·WEB TIP/Oracle
SELECT NVL( (SELECT MAX(SEQ) FROM 테이블명 WHERE PROM_SEQ=325),0)+1 FROM DUAL
·WEB TIP/MS-SQL
SELECT * FROM 테이블명 WITH(INDEX(인덱스이름)) or WITH(NOLOCK)
·WEB TIP/Oracle
SELECT to_date('20050501') + rownum -1 FROM all_tables WHERE rownum
·WEB TIP/Oracle
출처 : 오라클클럽CREATE SEQUENCE sequence_name [START WITH n] [INCREMENT BY n] [MAXVALUE n | NOMAXVALUE] [MINVALUE n | NOMINVALUE] [CYCLE | NOCYCLE]예문) CREATE SEQUENCE seq START WITH 1 INCREMENT BY 1 MAXVALUE 100 → 초기값 1, 증가값 1, 최대값 100
·WEB TIP/Oracle
CREATE TABLE [schema].테이블이름 AS SELECT * FROM [schema].테이블이름
제프
'WEB TIP' 카테고리의 글 목록 (15 Page)