Re: Ayuda

From: Mario Gonzalez <gonzalemario(at)gmail(dot)com>
To: joel martinez <ycasimiro2003(at)yahoo(dot)es>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Ayuda
Date: 2005-10-25 11:29:52
Message-ID: 2065a6cf0510250429r36936fb2r@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On 24/10/05, joel martinez <ycasimiro2003(at)yahoo(dot)es> wrote:
>
>
> Necesito ayuda pues estoy trabajando con postgresql y no se como hacer una
> relacion donde la llave primaria de una tabla pase como llave foranea para
> otro ciendo a la ves llave primaria.
>
Si te entendi... creo que es esto lo que quieres hacer:

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));

Saludos!!
>
>

In response to

  • Ayuda at 2005-10-24 21:14:21 from joel martinez

Responses

  • Re: Ayuda at 2005-10-25 14:14:49 from Alvaro Herrera

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message JucaviLst 2005-10-25 13:57:05 Re: No conecta a un Windows 2003 server
Previous Message TooManySecrets 2005-10-25 06:34:33 Rendimientos.