Why Use WHERE 1=2 in SQL
Some time ago I wrote a 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.
Some time ago I wrote a 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.
This post is a short note on how to install Postgres on Ubuntu 20.04. I’m doing this in WSL, however this shouldn’t make any difference if you’re on the same Ubuntu version.
Tracking database file sizes and free space within data and log files is an important part of monitoring SQL Server. This information, along with other metrics such as growth events, can help you to better predict and plan for future disk space provisioning needs.
Finding strings in SQL is usually done within a WHERE clause – you’re searching for rows in a table containing your condition which can of course include a string.
When performing data analysis of email data in SQL, there’s often a need to show only the domain of an email address.
USE [database] in SQL Server is a way to change the context to a specific database when you are running a query in Microsoft SQL Server.
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.
The Disk Usage by Top Tables Report in SQL Server is a quick way to get the sizes of all tables within a database.
This post contains a SQL script that will return all schemas, tables and columns in Redshift or Postgres. I’m combining the Redshift and Postgres database blog categories here.
If you’re running a SQL Server and you care about the data held in it, you should already be backing up the databases.
A common SQL question is, why would anyone use WHERE 1=1 in their queries? And what does it do? The WHERE 1=1 condition means WHERE TRUE.
This is my 3rd Linked Server demo post, and this time it’s to a MySQL database. Noteworthy weblinks: # My Linked Server Blog Posts.# Microsoft Docs – Linked Servers.