Subject Re: [ib-support] Creating a foreign key
Author Daniel Rail
At 27/06/2002 10:58 AM, you wrote:
>What is the code for adding a foreign key to a table, just a simple foreign
>key from one table to another?

You need to use ALTER TABLE, once the table is created or add the foreign
key in the CREATE TABLE statement.

>Creating one table is simple enough, but then when you create the second
>table with a foreign key to the first, can you specify that a field is a
>foreign key at the time you create the second table?

Yes you can. Look in the Language Reference Guide for more information on
creating foreign keys with CREATE TABLE.

Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (