<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>best practice on AdaTheDev Blog</title><link>https://www.adathedev.co.uk/tags/best-practice/</link><description>Recent content in best practice on AdaTheDev Blog</description><generator>Hugo -- gohugo.io</generator><managingEditor>adathedev@gmail.com (Adrian Hills)</managingEditor><webMaster>adathedev@gmail.com (Adrian Hills)</webMaster><lastBuildDate>Tue, 23 Feb 2010 21:42:00 +0000</lastBuildDate><atom:link href="https://www.adathedev.co.uk/tags/best-practice/index.xml" rel="self" type="application/rss+xml"/><item><title>Autogenerated SQL constraint names - why to avoid them</title><link>https://www.adathedev.co.uk/2010/02/autogenerated-sql-constraint-names-why.html</link><pubDate>Tue, 23 Feb 2010 21:42:00 +0000</pubDate><author>adathedev@gmail.com (Adrian Hills)</author><guid>https://www.adathedev.co.uk/2010/02/autogenerated-sql-constraint-names-why.html</guid><description>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&amp;rsquo;t explicitly specify one? Why does it matter if it names my PRIMARY KEY constraint &amp;ldquo;PK__Constrai__3214EC271FCDBCEB&amp;rdquo;, or my DEFAULT constraint &amp;ldquo;DF__Constraint__ColumnA__21B6055D&amp;rdquo;?
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.</description></item></channel></rss>