I am a universitary student from BRASIL, and Im using PostGreSQL data base.
Im designing my data base and I have one question.
How to create a foreing key in PostGreSQL.
Im using the following command:
CREATE TABLE test(
pnr char(10),
nome char(20),
id decimal REFERENCE <parent table>);
and
CREATE TABLE test(
pnr char(10),
nome char(20),
id decimal,
FOREING KEY (id) REFERENCES <parent table>);
Where parent table is the table with the primary key.
Regards
Filipi Damasceno Vianna
&
Alessandro Orso