Home » RDBMS Server » Server Administration » Re: serial columns in oracle
Re: serial columns in oracle [message #370214] Thu, 19 November 1998 14:09
Rajagopal.s
Messages: 2
Registered: November 1998
Junior Member
serial nos. in oracle is created by an object
called sequence.
you have create a sequence and attach with a
coloum in a table.
following is the syntax for "Sequence" creation

CREATE SEQUENCE <SEQ_NAME> INCREMENT BY n START WITH n MAXVALUE n MINVALUE n CYCLE/NOCYCLE
CACHE/NOCACHE

example:

sql> create table temp(id number (3),name varchar2(15));
sql> insert into temp values(custseq.nextval,'Vijay');
sql>--create custseq sequence first
sql>--you can alter sequence
sql>alter sequence custseq maxvalue 15;
Previous Topic: Re: DBMS_lock.SLEEP
Next Topic: Re: VB code for connecting to Oracle-- reqd.
Goto Forum:
  


Current Time: Fri Oct 23 17:25:51 CDT 2020