查找myuser表上面的isadmin字段上面的默认值约束,查询sql如下:
SELECT name FROM sys.default_constraints WHERE parent_object_id = OBJECT_ID('myuser') AND parent_column_id = COLUMNPROPERTY(OBJECT_ID('myuser'), 'isadmin', 'ColumnId' )
查找myuser表上面的isadmin字段上面的默认值约束,查询sql如下:
SELECT name FROM sys.default_constraints WHERE parent_object_id = OBJECT_ID('myuser') AND parent_column_id = COLUMNPROPERTY(OBJECT_ID('myuser'), 'isadmin', 'ColumnId' )