sys.default_constraints
compatibility #compatibility#catalog-view
Description
Analytics Platform System (PDW) SQL database in Microsoft Fabric 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 For a list of columns that this view inherits, see 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,
Syntax
HumanResources.Employee
Examples
Example 1
VacationHours
Example 2
HumanResources.Employee
Example 3
USE AdventureWorks2022;
GO
SELECT d.definition
FROM sys.default_constraints AS d
INNER JOIN sys.columns AS c
ON d.parent_object_id = c.object_id
AND d.parent_column_id = c.column_id