Thread: START for SERIAL type?

START for SERIAL type?

From
jferry@iexposure.com
Date:
When you create a SEQUENCE, you are allowed to specify a START.  Is
there a way to specify a START if you use a serial type in a CREATE
TABLE statement?

I'm envisioning something like:
CREATE TABLE foo ( foo_id    serial ( 101 ) );




Re: START for SERIAL type?

From
Vivek Khera
Date:
>>>>> "j" == jferry  <jferry@iexposure.com> writes:

j> When you create a SEQUENCE, you are allowed to specify a START.  Is
j> there a way to specify a START if you use a serial type in a CREATE
j> TABLE statement?

No.  You do it after you create the table.  The SERIAL type creates a
sequence, so just use the sequence command setval() to set the
starting value for the named sequence.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/


Re: START for SERIAL type?

From
"Frank Contrepois"
Date:
read the doc section datatype!!!
serial just create a sequence on a standard way, if you dont like it you'll
have to create your sequence.
bye
--
--

"L'idea di base � estremamente semplice..."
�opyright Frank "Pazzooo" Contrepois (schiavista francese del '900)