XML sql:column passes a typed relational value into XQuery. Keep node existence separate from a missing document and a scalar Boolean.
Migrating From MySQL to SQL Server: AUTO_INCREMENT, LIMIT and Other Differences
Plan migrating from MySQL with clear translations for identity values, paging, dates, booleans, string functions, and upserts.
SQL SERVER – CTAS – Create Table As SELECT – What is CTAS?
CTAS stands for Create Table As Select. In SQL Server you do it with SELECT INTO, which creates the new table and fills it with data in one step.
Finding the Slowest Stored Procedures With sys.dm_exec_procedure_stats
Find the slowest stored procedures with cache statistics, compare CPU and reads, and use two snapshots to isolate one busy hour.
SQL SERVER – How to Use Decode in SQL Server?
CASE expresses the DECODE mapping in this SQL Server example. I keep the named matches and default value explicit.
Common Table Expressions for Readability
Common table expressions for readability name query steps and support recursion, but they do not promise cached intermediate results.
geometry STDistance: Measure the Closest Points of Two Shapes
geometry STDistance measures the shortest distance between points belonging to two represented shapes. I compare an interior gap with an endpoint gap. Intersecting shapes provide a useful zero-distance case.







