Re: [GENERAL] The use of sequences

Поиск
Список
Период
Сортировка
От Jeremiah Davis
Тема Re: [GENERAL] The use of sequences
Дата
Msg-id Pine.3.89.9808181137.A20075-a200000@onramp.freeway.net
обсуждение исходный текст
Ответ на The use of sequences  (Roy Sigurd Karlsbakk <roy@christianianett.no>)
Список 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 по дате отправления:

Предыдущее
От: Roy Sigurd Karlsbakk
Дата:
Сообщение: The use of sequences
Следующее
От: Os Tyler
Дата:
Сообщение: sequences/operators