Posts by Tauan Oliveira • 1 point
1 post
-
0
votes1
answer37
viewsQ: How to join two results in a conditional query
Talk, you guys! Would anyone know how to use a Union All on parole? Example: DECLARE @cond INT = 1 SELECT * FROM table1 IF(@cond = 1) BEGIN UNION ALL SELECT * FROM table2 END The idea is this but…