RE: Can someone help me with some syntax please?
Posted in 1996
Steve
The syntax is:
ALTER TABLE master
ADD CONSTRAINT PRIMARY KEY (master_key)
CONSTRAINT "informix".pk_master;
ALTER TABLE detail
ADD CONSTRAINT FOREIGN KEY
REFERENCES master
CONSTRAINT "informix".fk_detail_master;
Hope this helps
Sujit Pal
DBA, Computer Sciences Corp.
----------
From: Steve Proctor[SMTP:Steve.Proctor@worldnet.att.net]
Sent: Monday, September 16, 1996 7:26 AM
To: informix-list@rmy.emory.edu
Subject: Can someone help me with some syntax please?
Suppose I have two tables
vvvvvvvvvvvvvvvvvvvvvvvvvvv
table master
master_key char(1)
table detail
detail_key char(1)
master_key char(1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Question :
What is the syntax if I want to alter the table detail so that the
column master_key is a foreign key to the column master_key in the
master table?