Why would someone use WHERE 1=1 AND
in a SQL clause (Either SQL obtained through concatenated strings, either view definition)
I\'ve
Here's a closely related example: using a SQL MERGE
statement to update the target tabled using all values from the source table where there is no common attribute on which to join on e.g.
MERGE INTO Circles
USING
(
SELECT pi
FROM Constants
) AS SourceTable
ON 1 = 1
WHEN MATCHED THEN
UPDATE
SET circumference = 2 * SourceTable.pi * radius;