SQL Server 2000 - Extracting constraint declarations

Note to self: stop googling around looking for ways to query the metadata out of SQL Server 2000. The metadata is almost always available in one of the views in the INFORMATION_SCHEMA schema.

Obtaining the actual constraint declaration for a given constraint can be done by using the sp_helptext stored procedure.

So do something like this:

EXEC sp_helptext ’some_constraint_name’


About this entry