2012年3月19日星期一

FK on a column to a table where the column is not the PK but a Unique Index

Hello everyone, I am new to ERWIN and I need helps from the experts out
there.

We are using ERWin 4.1.2771 and have reversed engineered some MS SQL
Server 2000 databases.

The problem we are having is that we have a FK on a column to a table
where the PK of the referencing table is on another column (such as an
identity column). We have a unique index on the column in the PK table
and SQL Server allows you to build a FK reference even though the
column is not defined as the PK.

Does anyone know how to create this type of FK within Erwin?

Thank YouStandard SQL allows you to reference any UNIQUE() constraint from a
FOREIGN KEY. Indexes do not exist in Standard SQL, so be sure to use
the UNIQUE() constraint.|||Use a unique constraint rather than a unique index.

--
David Portas
SQL Server MVP
--

没有评论:

发表评论