database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
ㆍDB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
DB2 Q&A 181 게시물 읽기
No. 181
Re: 시퀀스는 어떻게 하는지?
작성자
이전건(leejg68)
작성일
2001-11-19 15:29
조회수
14,689

DB2 V7.2 에 새로 추가된 오브젝트로 시퀀스가 있습니다.

 

저도 사용을 해 보지 않아서 아래의 자료를 참조하시기 바랍니다.

 

| CREATE SEQUENCE order_seq

| START WITH 1

| INCREMENT BY 1

| NOMAXVALUE

| NOCYCLE

| CACHE 24

 

In this example, the sequence is called order_seq. It will start at 1 and

increase by 1 with no upper limit. There is no reason to cycle back to the beginning and restart from 1 because there is no assigned upper limit. The number associated with the CACHE parameter specifies the maximum number of sequence values that the database manager preallocates and keeps in memory.

 

The sequence numbers generated have the following properties:

 

* Values can be any exact numeric data type with a scale of zero. Such data types include: SMALLINT, BIGINT, INTEGER, and DECIMAL.

* Consecutive values can differ by any specified integer increment.

The default increment value is 1.

* Counter value is recoverable. The counter value is reconstructed

from logs when recovery is required.

* Values can be cached to improve performance. Preallocating and

storing values in the cache reduces synchronous I/O to the log when values are generated for the sequence. In the event of a system

failure, all cached values that have not been committed are never

used and |considered lost. The value specified for CACHE is the

maximum number of sequence values that could be lost.

 

 

-- JIN 님이 쓰신 글:

>> identity column말고

>> 오라클의 시퀀스같이

>> 생성하고 어느곳에든 사용할수 있는 그런게 있을것같은데

>> 어떻게 만들고 어떻게 사용하는지요..

[Top]
No.
제목
작성자
작성일
조회
176solaris상에 DB2 설치시 에러..
jenny
2001-11-14
11277
184┕>Re: solaris상에 DB2 설치시 에러..
이전건
2001-11-19 15:53:03
11953
175online 백업시 에러 관련
jenny
2001-11-14
11965
183┕>Re: online 백업시 에러 관련
이전건
2001-11-19 15:50:47
13193
173DB2의 정의,조작,제어 기능 궁금점
꿔니
2001-11-12
12161
182┕>Re: DB2의 정의,조작,제어 기능 궁금점
이전건
2001-11-19 15:40:44
13450
172시퀀스는 어떻게 하는지?
JIN
2001-11-07
12473
181┕>Re: 시퀀스는 어떻게 하는지?
이전건
2001-11-19 15:29:39
14689
170DB2에서 서브쿼리
정진영
2001-11-06
15630
180┕>Re: DB2에서 서브쿼리
이전건
2001-11-19 15:16:32
16698
167필드락(Lock)에 대한 질문여..^_^
지나가다 급한넘
2001-11-03
14034
168┕>Re: 필드락(Lock)에 대한 질문여..^_^
이전건
2001-11-05 15:15:13
15044
169 ┕>Re: Re: 필드락(Lock)에 대한 질문여..^_^
이명식
2001-11-05 16:18:10
14549
189  ┕>Re: Re: Re: 필드락(Lock)에 대한 질문여..^_^
이전건
2001-11-19 17:07:06
14148
164db2에서 다음의 내용이 의미하는것은 무엇인가요
netroot
2001-10-31
17278
166┕>Re: db2에서 다음의 내용이 의미하는것은 무엇인가요
이전건
2001-11-02 19:10:48
18006
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.023초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다