Skip site navigation (1) Skip section navigation (2)

References to SERIAL

From: Thomas SMETS <tsmets(at)altern(dot)org>
To: psql sql <pgsql-sql(at)postgresql(dot)org>
Subject: References to SERIAL
Date: 2000-12-30 16:39:32
Message-ID: 3A4E0FC4.4D9EB1F8@altern.org (view raw or flat)
Thread:
Lists: pgsql-sql
Hi,
If i create a "internal pk" buy defining on a table a field SERIAL.
How do I reference this field in the other table to set the field
possible value ?


create table book (
/* This is an internal primary key for the book description */
	book_pk serial,
	.... // End of Book def
);

create table books_authors (
??? // I want to reference the book pk & the author pk to be able to
make the X-ref ?
);

tx,

THomas










-- 
Sat Dec 30 15:23:42 CET 2000

Thomas SMETS                        e-mail : tsmets(at)altern(dot)org
Av. de la Brabançonne 133 / 3       Tel. : +32 (0)2 742. 05. 94.
1030 Bruxelles
======= Quote of the Day =========
"In the long run, every program becomes rococo, and then rubble."
-- Alan Perlis
========= End of Quote ===========

Responses

pgsql-sql by date

Next:From: Brett W. McCoyDate: 2000-12-30 18:21:40
Subject: Re: References to SERIAL
Previous:From: Albert REINERDate: 2000-12-30 11:20:42
Subject: PL/pgSQL: returning array?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group