Some time ago I wrote short blog post on why use WHERE 1=1 in SQL. This time it’s why use WHERE 1=2, but really this can be WHERE 1=9 or anything that isn’t a 1, we just want the false statement.
When you log into SQL Server using SQL Server Management Studio (SSMS), opening a new query window will automatically scope you within the default database set when your user was created.
A common SQL question is, why does anyone use WHERE 1=1 in their queries? And what does it do? The condition means WHERE TRUE, so it’s just bringing back the same query result as it would without.
This is my 3rd Linked Server post, and this time it’s to a MySQL database. Noteworthy weblinks: # My Linked Server Blog Posts.# Microsoft Docs – Linked Servers.
Restarting services is a simple one, although it could be an unfamiliar environment for pre-SQL Server 2017 (only) administrators; which was the edition that allowed SQL Server to run on Linux.