Is autogenerated constraint name in SQL Server same?
constraints, sql, sql-server
Solution
I got the answer from one blog. Here is the link http://www.databasejournal.com/features/mssql/article.php/1570801/Beware-of-the-System-Generated-Constraint-Name.htm
Short summary: System generated constraint name can be different so if you want to refer it in script, explicitly provide names to constraint and use it later on.
Problem
I am currently working on one project in which I want to drop some foreign key constraint on columns. But the tragedy is all constraint are generated by Hibernate itself. I have dump of an old database. So my question is: can I use my database's constraint name in a script which I am going to provide to client? Because it will depend on the name of constraint. If autogenerated names are same then there is no issue. So can I be sure that my database's constraint will match client database's constraints?