Re: Create table & serial question
От | Dror Matalon |
---|---|
Тема | Re: Create table & serial question |
Дата | |
Msg-id | 20021118195210.GV43588@four.zapatec.com обсуждение исходный текст |
Ответ на | Create table & serial question (Alex Dovlecel <dovle@kbs.twi.tudelft.nl>) |
Список | pgsql-jdbc |
Just do INSERT INTO ROUTE VALUES('10/10/1999') ; It will automatically populate the next value. On Mon, Nov 18, 2002 at 08:30:13PM +0100, Alex Dovlecel wrote: > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly -- Dror Matalon Zapatec Inc 1700 MLK Way Berkeley, CA 94709 http://www.zapatec.com
В списке pgsql-jdbc по дате отправления: