Nov 12, 2019 01:48 PM|imapsp|LINK
The first part (above the union) returns the row from your original query.
The second part has been added to return the second row. The snippet you quoted is inside the Cross Apply operator with Alias CA. Internal aliases (A and B) are not visible outside Cross Apply.
About Id, replace with the column that is the PK from table1 and add that column in the first part as well. This condition is required so that the same row as the first part is not returned.