pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedThe use of sequences
3+ messages / 3 participants
[nested] [flat]
* The use of sequences
@ 1998-08-18 14:40 Roy Sigurd Karlsbakk <roy@christianianett.no>
0 siblings, 2 replies; 3+ messages in thread
From: Roy Sigurd Karlsbakk @ 1998-08-18 14:40 UTC (permalink / raw)
To: pgsql-general@postgreSQL.org <pgsql-general@postgreSQL.org>
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)
Attachments:
roy.vcf (text/x-vcard, 202B) download
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [GENERAL] The use of sequences
@ 1998-08-18 15:27 Herouth Maoz <herouth@oumail.openu.ac.il>
parent: Roy Sigurd Karlsbakk <roy@christianianett.no>
1 sibling, 0 replies; 3+ messages in thread
From: Herouth Maoz @ 1998-08-18 15:27 UTC (permalink / raw)
To: Roy Sigurd Karlsbakk <roy@christianianett.no>; +Cc: pgsql-sql
At 17:40 +0300 on 18/8/98, 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?
Look in the manpage of create_sequence
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [GENERAL] The use of sequences
@ 1998-08-18 15:54 Jeremiah Davis <jdavis@gaslightmedia.com>
parent: Roy Sigurd Karlsbakk <roy@christianianett.no>
1 sibling, 0 replies; 3+ messages in thread
From: Jeremiah Davis @ 1998-08-18 15:54 UTC (permalink / raw)
To: Roy Sigurd Karlsbakk <roy@christianianett.no>; +Cc: pgsql-general@postgreSQL.org <pgsql-general@postgreSQL.org>
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)
>
>
Attachments:
roy.vcf (text/x-vcard, 202B) download
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1998-08-18 15:54 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-08-18 14:40 The use of sequences Roy Sigurd Karlsbakk <roy@christianianett.no>
1998-08-18 15:27 ` Herouth Maoz <herouth@oumail.openu.ac.il>
1998-08-18 15:54 ` Jeremiah Davis <jdavis@gaslightmedia.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox