Question: How to Add Constraint With No Validation?
Answer: I got this question from one of my clients of who is an Oracle user.
A check constraint on identity column values can make every insert fail, because the identity moves on whether or not the row is accepted. This post reproduces the failure, shows that the failed attempts still use up identity values, and lists every such constraint in a database with one query.
Microsoft has recently released a single installer which now installs SSMS and ADS both together in a single Installation.
Is it possible that your statistics are many years old but still are valid? It is difficult to find Outdated Statistics is not as easy as it seems.
To find the oldest statistics in SQL Server, read the last update time and the number of changes since. This post builds a small demo, lists every statistic with its age and percent changed, and shows why a high change count on its own is not a reason to update by hand.
Do you know what a single arrow means in an execution plan? While we popularly call it the arrow, there is a technical name for these little arrows.
To add columns with NULL in SQL Server, first decide what an empty value means. This post sums three nullable columns with the plus operator, ISNULL, COALESCE and SUM, shows where each one differs on a row of all NULLs, and compares their CPU cost on two million rows.