How to create a FOREIGN KEY constraint using a database diagram (Enterprise Manager)

To create a FOREIGN KEY constraint using a database diagram

  1. Open a database diagram.
  2. If you have not already defined a PRIMARY KEY or UNIQUE constraint in the foreign key table, do so now.
  3. In the foreign key table, create a column.

    The foreign key column must match the data type and size of the primary key column, with these exceptions:

  4. Click the primary key columns that you want to copy to the foreign key table.
  5. Copy the columns from the primary key table to the foreign key table.
See Also
Creating and Modifying FOREIGN KEY Constraints Defining Key Relationships Using Database Diagrams
How to copy columns from one table to another using a database diagram How to open a database diagram

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.