INF: Support for Referential Integrity in SQL Server

Last reviewed: April 30, 1997
Article ID: Q132949

The information in this article applies to:
  • Microsoft SQL Server, version 6.0

SUMMARY

Microsoft SQL Server version 6.0 now includes support for declarative referential integrity via CONSTRAINTS as defined by the American National Standards Institute (ANSI) X3.135-1992 specification. Therefore, the system stored procedures sp_primarykey, sp_foreignkey, sp_helpkey, sp_helpjoins, sp_dropkey, and sp_commonkey are now obsolete.

MORE INFORMATION

The stored procedures listed above, and the system catalog table syskeys, are still available for use in SQL Server version 6.0 for backward compatibility. However, they are no longer documented and are now obsolete for primary and foreign key definitions.

These procedures may not be available in future versions of SQL Server. Therefore, you should use declarative referential integrity using CONSTRAINTS to define primary and foreign keys.

NOTE: See the SQL Server "Administrator's Companion," "Database Developer's Companion," or the "Transact-SQL Reference" for more information on using CONSTRAINTS for referential integrity.


Additional query words: sql6 alter sysconstraints Windows NT
Keywords : kbother kbusage SSrvStProc SSrvWinNT
Version : 4.21a 6.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.