Search

μ‹œν€€μŠ€

μ‹œν€€μŠ€

νŠΉμ • κ·œμΉ™μ— 따라 μ—°μ†λœ 숫자λ₯Ό μƒμ„±ν•˜λŠ” 객체
ex) κ²Œμ‹œκΈ€ 등둝 μ‹œ, κ²Œμ‹œκΈ€ 번호λ₯Ό μžλ™μœΌλ‘œ μ¦κ°€μ‹œμΌœμ£ΌλŠ” μ‹œν€€μŠ€

μ‹œν€€μŠ€ 생성

CREATE SEQUENCE μ‹œν€€μŠ€λͺ… [INCREMENT BY 증가값] [START WITH μ‹œμž‘κ°’] [MAXVALUE μ΅œλŒ“κ°’] [MINVALUE μ΅œμ†Ÿκ°’] ;
SQL
볡사

μ‹œν€€μŠ€ μ‚¬μš©

ν˜„μž¬ μ‹œν€€μŠ€ κ°’ : μ‹œν€€μŠ€λͺ….CURRVAL λ‹€μŒ μ‹œν€€μŠ€ κ°’ : μ‹œν€€μŠ€λͺ….NEXTVAL
SQL
볡사

μ‹œν€€μŠ€ μˆ˜μ •

ALTER SEQUENCE μ‹œν€€μŠ€λͺ… [INCREMENT BY 증가값] [START WITH μ‹œμž‘κ°’] [MAXVALUE μ΅œλŒ“κ°’] [MINVALUE μ΅œμ†Ÿκ°’] ;
SQL
볡사

μ‹œν€€μŠ€ μ‚­μ œ

DROP SEQUENCE μ‹œν€€μŠ€λͺ…;
SQL
볡사

μ˜ˆμ‹œμ½”λ“œ

β€’
νšŒμ›λ²ˆν˜Έ μ‹œν€€μŠ€ 생성
CREATE SEQUENCE seq_ms_user INCREMENT BY 1 START WITH 1 MINVALUE 1 MAXVALUE 1000000;
SQL
볡사
β€’
μ‹œν€€μŠ€ 쑰회
SELECT SEQ_MS_USER.nextval FROM dual;
SQL
볡사