With ANSI_WARNINGS OFF, SQL Server cuts a string to fit its column and reports no error. This post runs the same insert with the setting on and off, and shows what else changes: variables, divide by zero and filtered indexes. It also shows how to check which setting a session uses.
SELECT INTO Table Variable: Why It Fails and What to Use
SELECT INTO table variable fails with Msg 102 because SELECT INTO creates its target table and a table variable must be declared first. This post shows two working fixes, a declared table variable and a temp table. It also compares them on rollback, dynamic SQL and row estimates.
How to Join Two Tables Without Using Join Keywords? – Interview Question of the Week #266
Question: How to Join Two Tables Without Using Join Keywords?
Answer: In my life, I have attended many interviews as an interviewer.
Detecting Changed Rows With a Row Hash
Compare one fingerprint instead of twenty columns. I show a safe HASHBYTES recipe, the NULL trap that fools CONCAT_WS, and a load that touches only the rows that changed.
Smiley in SSMS: Show Emoji in Results and Database Names
To show a smiley in SSMS, type the emoji inside an N-prefixed string and run the query. This post explains how SQL Server stores each emoji as two characters, why two different emoji can compare as equal, and how to find them in a column. It also shows what happens when an emoji is part of a database name.
AUTOGROW_ALL_FILES: What Replaced Trace Flags 1117 and 1118
AUTOGROW_ALL_FILES and MIXED_PAGE_ALLOCATION replaced trace flags 1117 and 1118, which once made tempdb grow its files together and use whole extents. This post checks the flags on a server, reads the settings that replaced them and demonstrates both on a demo database. It also says what to do with a startup parameter that still names them.







