This script would help find primary key, foriegn key, unique constraints, check constraints on a table. With slight modification you can use it to find various information about a table.
2001-08-22
714 reads
Justin-14543,
2002-04-01
This script would help find primary key, foriegn key, unique constraints, check constraints on a table. With slight modification you can use it to find various information about a table.
select b.COLUMN_NAME from INFORMATION_SCHEMA.table_constraints a inner join INFORMATION_SCHEMA.key_column_usage b on a.CONSTRAINT_CATALOG = b.CONSTRAINT_CATALOG and a.CONSTRAINT_SCHEMA = b.CONSTRAINT_SCHEMA and a.CONSTRAINT_NAME = b.CONSTRAINT_NAME where a.TABLE_CATALOG = '<db Name>' and a.TABLE_SCHEMA = '<owner Name' and a.TABLE_NAME = '<table Name>' and a.CONSTRAINT_TYPE = '<constraint Type>' order by b.ordinal_position
You rated this post out of 5. Change rating
2001-08-22
714 reads
2001-08-22
366 reads
Very simple, how much space is free on the hard drives of the SQL Server you are connected to.
2001-08-22
652 reads
Get OLE Providers info I have found this useful in tracking down application driver/connection issues. I only had to use it 2 times. But it did help
2001-08-22
399 reads
2001-08-22
699 reads