Applies To: SQL Server 2014, SQL Server 2016 Preview
Contains a row for each object that is a default definition (created as part of a CREATE TABLE or ALTER TABLE statement instead of a CREATE DEFAULT statement), with sys.objects.type = D.
Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database, Azure SQL Data Warehouse Public Preview.
<Columns inherited from sys.objects>
For a list of columns that this view inherits, see sys.objects (Transact-SQL).
ID of the column in parent_object_id to which this default belongs.
SQL expression that defines this default.
1 = Name was generated by system.
0 = Name was supplied by the user.
The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.
The following example returns the definition of the DEFAULT constraint that is applied to the VacationHours column of the HumanResources.Employee table.
USE AdventureWorks2012; GO SELECT d.definition FROM sys.default_constraints AS d INNER JOIN sys.columns AS c ON d.parent_column_id = c.column_id WHERE d.parent_object_id = OBJECT_ID(N'HumanResources.Employee', N'U') AND c.name = 'VacationHours';