Received: from aeon.tvd.be (aeon.tvd.be [195.162.196.20]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBHNZR629140 for ; Sun, 17 Dec 2000 18:35:27 -0500 (EST) (envelope-from tsmets@altern.org) Received: from altern.org (cable-213-132-133-50.upc.chello.be [213.132.133.50]) by aeon.tvd.be (8.9.3/8.9.3/RELAY-1.1) with ESMTP id AAA26856 for ; Mon, 18 Dec 2000 00:35:41 +0100 (MET) Message-ID: <3A3D4D26.9302EE75@altern.org> Date: Mon, 18 Dec 2000 00:32:54 +0100 From: Thomas SMETS Organization: Private X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.9-27mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: psql sql Subject: Don't understand creation statement's answer Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200012/188 X-Sequence-Number: 522 Hi, In the long term I'm willing to construct a Little Java application that runs a library. I was looking to create a few table & connect them according to a non existing model . To create the Author table here's what I thought doing for a table that should only contain The Name & the Surname of the Author (once per Author). tsmets=> create sequence author_seq; CREATE tsmets=> create table author ( tsmets=> author_id numeric primary key default nextval('author_seq'), tsmets=> name char(25) not null, tsmets=> surname char(25) not null tsmets=> ); NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'author_pkey' for table 'author' CREATE tsmets=> \d author Table "author" Attribute | Type | Modifier -----------+---------------+---------------------------------------------- author_id | numeric(30,6) | not null default nextval('author_seq'::text) name | char(25) | not null surname | char(25) | not null Index: author_pkey tsmets=> Now the question is : What is the meaning of the following statement in the table description ? Attribute | Type | Modifier -----------+---------------+---------------------------------------------- author_id | numeric(30,6) | not null default nextval('author_seq'::text) Why was my author_id changesdin a "nextval('author_seq'::text)". There's no text here ? That for highlighting the meaning of this ? Thomas, -- Sun Dec 17 19:42:31 CET 2000 Thomas SMETS e-mail : tsmets@altern.org Av. de la Brabançonne 133 / 3 Tel. : +32 (0)2 742. 05. 94. 1030 Bruxelles ======= Quote of the Day ========= If at first you don't succeed, you must be a programmer. ========= End of Quote ===========