● 시퀀스 ( Sequence ) > ORACLE

본문 바로가기
사이트 내 전체검색

ORACLE

● 시퀀스 ( Sequence )

페이지 정보

profile_image
작성자 관리자
댓글 0건 조회 638회 작성일 23-04-19 15:41

본문

 Mysql 에는 auto_increment 속성이 있어 자동으로 + 1 처리를 해주지만 ORACLE 에서는 시퀀스를 이용해서 처리 --



CREATE TABLE NOTICE2 (

id NUMBER not null, 

title NVARCHAR2(200) not null,

content CLOB not null,

writer NVARCHAR2(20) not null,

signdate TIMESTAMP default sysdate,

hit NUMBER default 0,

files NVARCHAR2(500) null

);



create SEQUENCE notice2_seq;


eb0296137fc37ad8a7de9b3ab587b744_1682035773_5893.png
 


insert into notice2 (id,title,content,writer) values(notice2_seq.nextval,'제목1','내용1','1111');

insert into notice2 (id,title,content,writer) values(notice2_seq.nextval,'제목2','내용2','1111');

insert into notice2 (id,title,content,writer) values(notice2_seq.nextval,'제목3','내용3','1111');



select * from notice2;


18bb88d64b15ed3827f1f56d441458b4_1681887168_2915.png

 

추천0 비추천0

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

공지사항
자유게시판
질문답변
1:1문의

 

별명 : 터푸가위
주소 : 부산시 동래구 명장로20번길 90
대표 : 박규태
메일 : dancepkt@******.com

접속자집계

오늘
109
어제
282
최대
10,760
전체
281,427
Copyright © dancePKT . All rights reserved.