标签:ble unique alq schema name highlight column sch 如何
IF ( SELECT COUNT(*) FROM sys.index_columns INNER JOIN sys.indexes ON indexes.index_id = index_columns.index_id AND indexes.object_id = index_columns.object_id INNER JOIN sys.columns ON columns.column_id = index_columns.column_id AND columns.object_id = indexes.object_id WHERE indexes.object_id=OBJECT_ID(N‘dbo.tblEnh_SuppQuo‘, N‘U‘) AND indexes.is_unique=1 AND columns.name =N‘InternalQuoNo‘ )=1 BEGIN SELECT 1 END
或者
IF ( SELECT COUNT(*) FROM sys.index_columns INNER JOIN sys.indexes ON indexes.index_id = index_columns.index_id AND indexes.object_id = index_columns.object_id INNER JOIN sys.columns ON columns.column_id = index_columns.column_id AND columns.object_id = indexes.object_id INNER JOIN sys.objects ON objects.object_id = indexes.object_id WHERE objects.name=N‘tblEnh_SuppQuo‘ AND objects.schema_id=1 AND objects.type=N‘U‘ and indexes.is_unique=1 AND columns.name =N‘InternalQuoNo‘ )=1 BEGIN SELECT 1 END
标签:ble unique alq schema name highlight column sch 如何
原文地址:https://www.cnblogs.com/coolyylu/p/12515257.html