Autogenerated SQL constraint names - why to avoid them

added by AdaTheDev
2/23/2010 2:46:08 PM

0 Kicks, 79 Views

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"? This article explains reasons why you should specify a name yourself for each constraint.


0 comments