DB/Oracle

쿼리 짤때 좋은 참고 사이트

Lohen 2016. 2. 4. 23:52

http://psoug.org/reference/connectby.html


아래와 같이 큰 제목과 설명 그리고 쿼리가 나와 있다.


링크 안에 들어가보면 엄청 많기 때문에 정말 유용하다.


 
CONNECT BY LEVEL
A condition that identifies the relationship between parent rows and child rows of the hierarchyCONNECT BY <child_value> = <parent_value>
conn uwclass/uwclass

CREATE TABLE t (
rid NUMBER(12),
col1 VARCHAR2(30),
col2 VARCHAR2(300));

CREATE SEQUENCE seq_t_rid;

INSERT INTO t
SELECT seq_t_rid.NEXTVAL, dbms_crypto.randombytes(15), dbms_crypto.randombytes(150)
FROM DUAL
CONNECT BY LEVEL <= 1000;


반응형