In SQL Server 2012, If i create a temporary table with a column default, it isn't reflected in sys.default_constraints table anymore.This is because sys.default_constraints View works with object_id > 0 but all temporary tables have object_id < 0 in SQL Server 2012.Perhaps a fix of view definition could be:CREATE VIEW sys.default_constraints AS SELECT name, object_id, principal_id, schema_id, parent_object_id, type, type_desc, create_date, modify_date, is_ms_shipped, is_published, is_schema_published, property AS parent_column_id, object_definition(object_id) AS definition, is_system_named FROM sys.objects$ WHERE type = 'D ' AND parent_object_id <> 0
Product Language
Version
Category
Operating System
Operating System Language
Steps to Reproduce
Actual Results
Expected Results
Platform
Virtualization