SQL Server 2012: Constraint has NULL for name. How can I drop this? -
i not sure how happened, have primary key constraint on 1 of tables , name null. discovered because had drop/recreate table, , when tried add primary key, system responded constraint existed.
i executed following:
select i.object_id, i.name, i.type_desc sys.indexes inner join sys.tables t on i.object_id = t.object_id , t.name = n'organization'
and result is:
object_id name type_desc 1570377655 null heap 1570377655 ix_organization_ownedbyorganizationid nonclustered
i tried dropping , recreating table several times , each time index there. how can drop constraint?
you can try find index trying add using following query:
select [table] = t.[name] , [index] = i.[name] , i.* sys.indexes inner join sys.tables t on t.[object_id] = i.[object_id]
martin has right answer index find null name.
Comments
Post a Comment