BUG: CREATE TABLE Allows More Than 31 FOREIGN KEYs (137431)



The information in this article applies to:

  • Microsoft SQL Server 6.0
  • Microsoft SQL Server 6.5

This article was previously published under Q137431
BUG #: 11130 (6.0)

SYMPTOMS

The documented limit on foreign keys for a single table is 31, yet the CREATE TABLE statement will allow a table to be created with more than 31 foreign keys.

WORKAROUND

To work around this problem, do not create a table with more than 31 foreign keys.

If you need to enforce more than 31 primary-foreign key relationships, encode trigger logic on either or both the parent and child tables.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5.

This problem does not apply to SQL Server 7.0, which has a limitation of 256 foreign keys.


Modification Type:MajorLast Reviewed:10/16/2003
Keywords:kbbug kbpending kbprogramming KB137431