Reputation: 502
I am currently working on someone's code and trying to figure out what below syntax is doing. I have written several merge statement but never used this kind of on clause. Can any one please help me in understanding if there is any specific scenarios where we use these kind of clauses (1=1)?
MERGE T
USING S on 1=1
WHEN NOT MATCHED THEN
Insert (col1,col2)
Values(col1,col2)
Upvotes: 0
Views: 36
Reputation: 570
It is clear by the query that has not to update any data only insertion for all data as 1=1 means always true for all;
Upvotes: 1