Enforce case-insensitive unique user names in a case-sensitive database using an indexed computed column with an explicit collation.
SQL SERVER – Performance: OR vs IN – A Summary and Further Reading
The varied responses led me to write a detailed blog post to clarify the correct answer. If you missed it, you can read it here. Let us see A Summary and Further Reading.
SQL SERVER – Scripts to Retrieve Column Names
Understanding how to retrieve column names from a table is one of the fundamental operations you should be familiar with.
Index a Computed Column in SQL Server
To index a computed column, define the formula once on the table and create a normal index on it. This post loads 200,000 rows, shows the scan, then the seek after the index, and tests the rules that decide whether SQL Server accepts the column.
COUNT(*), COUNT(column) and COUNT(DISTINCT): Basics That Trip People
Why do two counts of the same table disagree? Five tiny demos show NULL, blank text, LEFT JOIN placeholders, bigint and join multiplication.
Compute Scalar Operators: Why a Computed Column Shows Two
A plan that reads a computed column shows two Compute Scalar operators, and the second one looks like a mistake. This post compares three tables in the plan text: an expression in the query, a computed column and a persisted computed column. It shows what each of the Compute Scalar operators defines and whether the extra operator costs anything.
Second Identity Column Workaround: Computed Column or Sequence
A SQL Server table can have only one identity column, and a second one fails with Msg 2744. This second identity column workaround compares a computed column with a sequence, shows what each does with gaps, rollbacks and large values, and explains when to pick which.







