Create table & serial question

Поиск
Список
Период
Сортировка
От Alex Dovlecel
Тема Create table & serial question
Дата
Msg-id E18Drb3-0002aP-00@ford.kbs.twi.tudelft.nl
обсуждение исходный текст
Ответы Re: Create table & serial question
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Pedro Igor Craveiro e Silva"
Дата:
Сообщение: Object x Relational
Следующее
От: Dror Matalon
Дата:
Сообщение: Re: Create table & serial question