A column can only have one default constraint on it.
You can find the details for any such default constraint with the below query against sys.default_constraints
.
DECLARE @TableName NVARCHAR(500) = N'dbo.Test',
@ColumnName sysname = N'CreatedOnDate';
SELECT d.definition,
d.is_system_named, /* 1 if no name given by the user and was allocated a system generated one */
d.name
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
WHERE d.parent_object_id = OBJECT_ID(@TableName, N'U')
AND c.name = @ColumnName;
NB: If you later need to re-create the default constraint (perhaps to reference SYSUTCDATETIME
instead of GETDATE
) the constraint name created by your current CREATE TABLE
will be different in all environments and you will have to resort to dynamic SQL to do this. It is advisable to always name your constraints (for permanent tables).