Re: How to insert with a serial - Mailing list pgsql-general

From Flávio Brito
Subject Re: How to insert with a serial
Date
Msg-id 01102215494101.01182@pegasus
Whole thread Raw
In response to How to insert with a serial  (elwood@agouros.de (Konstantinos Agouros))
List 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

pgsql-general by date:

Previous
From: Keary Suska
Date:
Subject: Re: Listing users
Next
From: Rich Shepard
Date:
Subject: Re: How to insert with a serial