Received: from ww2.freeway.net (dns1.freeway.net [206.153.72.37]) by hub.org (8.8.8/8.7.5) with ESMTP id LAA11306 for ; Tue, 18 Aug 1998 11:54:37 -0400 (EDT) Received: from onramp.freeway.net (onramp.freeway.net [206.153.72.40]) by ww2.freeway.net (8.8.5/8.6.6) with SMTP id LAA11474; Tue, 18 Aug 1998 11:54:10 -0400 (EDT) Date: Tue, 18 Aug 1998 11:54:08 -0400 (EDT) From: Jeremiah Davis Subject: Re: [GENERAL] The use of sequences To: Roy Sigurd Karlsbakk cc: "pgsql-general@postgreSQL.org" In-Reply-To: <35D9924F.3506064E@christianianett.no> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY=------------FC80D9AADA19F0DE6931F327 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --------------FC80D9AADA19F0DE6931F327 Content-Type: TEXT/PLAIN; CHARSET=us-ascii 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 - > ChristianiaNett A/S, Akersgt. 11, 0158 OSLO, +47 2247 3100 > http://www.christianianett.no/ (norwegian) > > --------------FC80D9AADA19F0DE6931F327 Content-Type: TEXT/X-VCARD; CHARSET=us-ascii; NAME="roy.vcf" Content-ID: Content-Description: attachment; filename="roy.vcf" 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 --------------FC80D9AADA19F0DE6931F327--