Browse by Tags

How do I find the CHECK constraints that depend on a specified CLR user-defined type?
11 December 07 08:23 AM | SQL Master | 2 Comments   
Here is the another TSQL script from BOL to find the CHECK constraints that depend on a specified CLR user-defined type? USE <database_name>; GO SELECT SCHEMA_NAME(o.schema_id) AS schema_name ,OBJECT_NAME(o.parent_object_id) AS table_name ,OBJECT_NAME(o.object_id) Read More...
TSQL to check whether the table has a column with the specified name?
19 September 07 03:51 PM | SQL Master | 2 Comments   
Within SQL Server 2005: if Exists( select * from sys.columns where Name = N '<ColumnName>' and Object_ID = Object_ID ( N '<TableName>' ) ) begin --write your own code print relevant code columns for existence end else begin --write your own Read More...