How do I get the name of a columns default contraint on a SQL Server 2000 installation? As far as I know sys.default_constraints is not available. Its different on every DB, the structure is like DF_table_column__3DE8FB0E for example.
Thanks :)
How do I get the name of a columns default contraint on a SQL Server 2000 installation? As far as I know sys.default_constraints is not available. Its different on every DB, the structure is like DF_table_column__3DE8FB0E for example.
Thanks :)
Try using INFORMATION_SCHEMA, SQL Server's implementation of the SQL 92 self-describing features.
SELECT * FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE