By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
4 rows affected
SetId | Value |
---|---|
Set1 | 0 |
Set1 | 1 |
Set2 | 0 |
Set2 | 1 |
Msg 10729 Level 15 State 1 Line 3
A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed in a SELECT statement that is not the immediate source of rows for an INSERT statement.