Re: [GENERAL] The use of sequences - Mailing list pgsql-general

From Jeremiah Davis
Subject Re: [GENERAL] The use of sequences
Date
Msg-id Pine.3.89.9808181137.A20075-a200000@onramp.freeway.net
Whole thread Raw
In response to The use of sequences  (Roy Sigurd Karlsbakk <roy@christianianett.no>)
List pgsql-general
CREATE SEQUENCE some_sequence start 1 increment 1;

CREATE TABLE person (
id int4 default nextval('some_sequence'),
name varchar(200),
description text);

INSERT INTO person VALUES(nextval('some_sequence'),'Jeremiah','not much');

or

INSERT INTO person(name,description) VALUES('Jeremiah','not much');



On Tue, 18 Aug 1998, Roy Sigurd Karlsbakk wrote:

> Could somebody tell me how I can make efficient use of sequences? I am
> familiar with Oracle's sequences and they usually work as the following
> example:
>     INSERT INTO PERSON table(some_sequence.nextval,data,data,data);
>
> How do they work in postgreSQL?
>
> Roy
>
> --
> Roy Sigurd Karlsbakk - MCSE, CNE, CLS, ASE - <roy@christianianett.no>
> ChristianiaNett A/S, Akersgt. 11, 0158 OSLO, +47 2247 3100
> http://www.christianianett.no/ (norwegian)
>
>
begin:vcard
n:Karlsbakk;Roy Sigurd
x-mozilla-html:FALSE
org:ChristianiaNett A/S
version:2.1
email;internet:roy@christianianett.no
title:Seniorkonsulent
x-mozilla-cpt:;0
fn:Roy Sigurd Karlsbakk
end:vcard


pgsql-general by date:

Previous
From: Roy Sigurd Karlsbakk
Date:
Subject: The use of sequences
Next
From: Os Tyler
Date:
Subject: sequences/operators