How SET DATEFIRST changes the first day of the week, and how @@DATEFIRST returns the current value, which also changes with SET LANGUAGE. Simple examples.
SQL Server Interview Questions and Answers Part 6
Interview Questions and Answers Part 6 covers the six properties of relational tables and de-normalization, adding redundant data to help performance.
SQL Server Interview Questions and Answers Part 4
Interview Questions and Answers Part 4 begins with SQL Profiler: what it is, how it captures events to a file or table, and how to keep traces small.
SQL Server Interview Questions and Answers Part 3
Interview Questions and Answers Part 3 opens with NOLOCK: how the hint skips read locks, why that means dirty reads, and what it does for concurrency.
geometry STContains: Check Boundary Membership
geometry STContains differs from STIntersects at a polygon boundary. Four literal points expose the intended inclusion rule without treating ordinary language as a spatial predicate.
SQL SERVER – UDF – User Defined Function to Extract Only Numbers From String
A simple UDF, ExtractInteger, to extract only numbers from string input. I test it with a phone number that also has letters in it.
SQL SERVER – Search Text Field – CHARINDEX vs PATINDEX
CHARINDEX and PATINDEX both return the start position of a pattern in a text field. PATINDEX allows wildcards, CHARINDEX does not. Examples use AdventureWorks.







