Create table & serial question

From: Alex Dovlecel <dovle(at)kbs(dot)twi(dot)tudelft(dot)nl>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Create table & serial question
Date: 2002-11-18 19:30:13
Message-ID: E18Drb3-0002aP-00@ford.kbs.twi.tudelft.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello all
If this is too trivial... sorry. :o(((

I have created a table with the following command:

CREATE TABLE ROUTE
(
ID SERIAL ,
START DATE ,
PRIMARY KEY ( ID )
) ;

And it worked just fine. But if I call:
INSERT INTO ROUTE VALUES(10, '10/10/1999') ;
it ads a record but the id is 10. Is this the correct behaviour for the
SERIAL type? I was hoping it will be 1 and ignore the one that I set.

If this is the normal behaviour, how can I make it ignore the 10 and place
the next id?

Tx
dovle

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dror Matalon 2002-11-18 19:52:10 Re: Create table & serial question
Previous Message Pedro Igor Craveiro e Silva 2002-11-18 19:05:34 Object x Relational