I always want to learn SQL Server and XML file. Let us go over a very simple example, today about how to create XML using SQL Server.
JSON_PATH_EXISTS: Distinguish Missing and Null Properties
JSON_PATH_EXISTS tests path presence, including JSON null. Compare missing properties, empty arrays and SQL NULL on SQL Server 2022.
SQL SERVER – Start SQL Server Instance in Single User Mode
How to start a SQL Server instance in single user mode: add the -m; startup parameter in SQL Server Configuration Manager and restart the service.
SQL SERVER – Introduction to Force Index Query Hints – Index Hint – Part2
Part 2 on force index query hints: instead of the inline WITH table hint, use the OPTION clause at the end of the query and name the table for each hint.
SQL SERVER – Introduction to Force Index Query Hints – Index Hint
An index hint lets you force SQL Server to use a specific index in a query. I show the WITH (INDEX()) syntax with examples, and why it is for special cases only.
SQL SERVER – Quickest Way to – Kill All Threads – Kill All User Session – Kill All Processes
The quickest way to kill all processes and user sessions in a database: SET SINGLE_USER WITH ROLLBACK IMMEDIATE, then back to MULTI_USER. No cursor needed.
SQL SERVER – Observation – Effect of Clustered Index over Nonclustered Index
An observation from my query optimization work: the effect of clustered index on a nonclustered index, shown with a sample table and execution plans.







