On Thu, 22 Nov 2007 12:11:20 +0100
"Bart Degryse" <[EMAIL PROTECTED]> wrote:
> When you use serial a kind of macro is performed: in fact an integer field is
> created, a sequence is created with a name based on the table's name and the
> nextval of that sequence is used as the default value for t
am Thu, dem 22.11.2007, um 12:01:59 +0100 mailte Daniel bodom_lx Graziotin
folgendes:
> Hi everybody,
> I need to have a primary key which has to be unique on two tables.
> E.g.:
>
> CREATE TABLE first
> (
> id serial NOT NULL,
> testo text,
> )
>
> CREATE TABLE second
> (
> id serial NOT
When you use serial a kind of macro is performed: in fact an integer field is
created, a sequence is created with a name based on the table's name and the
nextval of that sequence is used as the default value for the field. Now you
have to do these steps "manually".
CREATE SEQUENCE "public"."t
Hi everybody,
I need to have a primary key which has to be unique on two tables.
E.g.:
CREATE TABLE first
(
id serial NOT NULL,
testo text,
)
CREATE TABLE second
(
id serial NOT NULL,
testo text,
)
When I insert some text on "first", I would like first.id = second.id
+ 1, and vice versa.