Autogenerated SQL constraint names - why to avoid them
Autogenerated constraint names in SQL Server - are they convenient, or are they a hindrance? For me, they are a hindrance.
Why should I care that SQL Server autogenerates a constraint name when I don’t explicitly specify one? Why does it matter if it names my PRIMARY KEY constraint “PK__Constrai__3214EC271FCDBCEB”, or my DEFAULT constraint “DF__Constraint__ColumnA__21B6055D”?
Why should I name each constraint myself and not rely on autogenerated constraint names?
Because it makes maintenance and database update deployments easier, simpler and in my opinion, safer.
[Read More]