Re: Ayuda

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Mario Gonzalez <gonzalemario(at)gmail(dot)com>
Cc: joel martinez <ycasimiro2003(at)yahoo(dot)es>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Ayuda
Date: 2005-10-25 14:14:49
Message-ID: 20051025141449.GC1957@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Mario Gonzalez escribió:

> test=# CREATE TABLE first_table (
> test(# a int PRIMARY KEY,
> test(# b int);
>
> test=# CREATE TABLE second_table (
> test(# a int PRIMARY KEY,
> test(# foreign key (a) REFERENCES first_table(a));

O mas corto

create table second_table (
a int primary key references first_table
);

--
Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)

In response to

  • Re: Ayuda at 2005-10-25 11:29:52 from Mario Gonzalez

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2005-10-25 14:17:00 Re: autocommit desde funcion plpgsql
Previous Message JucaviLst 2005-10-25 13:57:05 Re: No conecta a un Windows 2003 server