STRING_SPLIT ordinals preserve a token position for SQL Server 2022 and later. This example keeps duplicate tokens, exposes an empty token and orders the returned rows explicitly.
SQL SERVER – Random Number Generator Script – SQL Query
Random Number Generator. There are many methods to generate random numbers in SQL Server.
Method 1: Generate Random Numbers (Int) between Rang
SQL SERVER – Replication Keywords Explanation and Basic Terms
A quick reference of Replication keywords I wrote for Jr. DBAs: publisher, subscriber, distributor, publication and article, each explained in plain words.
SQL SERVER – Restrictions of Views – T SQL View Limitations
SQL Server views come with many rules, like ANSI_NULLS and QUOTED_IDENTIFIER being on. My list of view limitations, corrected with help from Ben Taylor.
SQL SERVER – Query to Retrieve the Nth Maximum Value
Finding the nth Maximum Value means deciding how ties should count. Here, I rank distinct known salaries.
SQL SERVER – Locking Hints with Correct Scope and Safe Examples
Locking Hints change how a table reference participates in locking. I choose the required consistency before changing the query.
SQL SERVER – Enable xp_cmdshell using sp_configure
Enable xp_cmdshell with sp_configure: turn on show advanced options, set xp_cmdshell to 1 and run RECONFIGURE. The full script is ready to run in SSMS.







