Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DatabaseName | SchemaName | TableName | ColumnName | ColumnType | ConstraintName |
- ConstraintType | Definition | CreateDate
- SELECT
- TableName = t.Name,
- ColumnName = c.Name,
- dc.Name,
- dc.definition
- FROM sys.tables t
- INNER JOIN sys.default_constraints dc ON t.object_id = dc.parent_object_id
- INNER JOIN sys.columns c ON dc.parent_object_id = c.object_id AND c.column_id = dc.parent_column_id
- ORDER BY t.Name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement