binary Conversion pads and truncates on different sides depending on the source type. I compare one integer with one string at two target widths. The resulting byte sequences show why width alone is not the complete rule.
REPLICATE: Zero Copies and Negative Counts Differ
REPLICATE treats zero copies differently from a negative count. I keep the source and requested count beside the result. Byte lengths and NULL flags reveal several blank-looking outcomes.
SQL SERVER – Introduction to Statistical Functions – VAR, STDEVP, STDEV, VARP
VAR, STDEVP, STDEV and VARP are statistical functions that also fit the aggregate function definition. A quick AdventureWorks example shows all four.
SQL SERVER – Introduction to Aggregate Functions
What are Aggregate Functions in SQL Server? The Books Online definition, the full list, and the NULL and GROUP BY rules that candidates often miss.
UNICODE: Supplementary Characters Depend on the Collation
UNICODE returns an integer for the first character, and supplementary-character support affects that integer. I make the collation explicit when interpreting those values. Otherwise the same visible input can produce a misleading comparison.
COALESCE Fallbacks: Empty Text Is Still a Supplied Value
COALESCE fallbacks keep empty text and spaces as supplied values. Apply an empty-value policy before choosing a display name.
Conditional COUNT: ELSE 0 Counts Nonmatching Rows
Conditional COUNT includes zero when CASE returns it. I compare an omitted ELSE with a zero branch before aggregating. A no-match group and an empty input expose the difference from SUM.







