From: | Flávio Brito <flavio(at)stat(dot)com(dot)br> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to insert with a serial |
Date: | 2001-10-22 17:49:41 |
Message-ID: | 01102215494101.01182@pegasus |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
HI Konstantin
Use insert into table (type) values ('typedesc');
The database will create a sequence number to put in id
Flávio Brito
Rio de Janeiro
Brasil
Em Dom 21 Out 2001 11:16, Konstantinos Agouros escreveu:
> Hi,
>
> I have a table defined like this:
>
> Attribute | Type | Modifier
> -------------+-----------------------+-------------------------------------
>----- name | character varying(40) |
> type | integer |
> id | integer | not null default
> nextval('serial'::text) ownerteamid | integer |
> Index: devices_pkey
>
> How do I insert into it so that id is automatically incremented?
>
> Konstantin
From | Date | Subject | |
---|---|---|---|
Next Message | Mitch Vincent | 2001-10-22 18:01:31 | Re: How to insert with a serial |
Previous Message | Nikola Milutinovic | 2001-10-22 17:41:29 | Problems setting up PostgreSQL and Tomcat JDBC connection |