是否可以基于参数进行条件连接;例如:
//PSEUDE CODE:
DECLARE @condition bit
SET @condition=1 or 0
SELECT *
FROM tableA
INNER JOIN tableB on tableA.SomeColumn = tableB.SomeColumn
if @condition = 0 THEN
INNER JOIN tableC ON tableC.SomeCOlumn = TableA.SomeColumn
ELSE
INNER JOIN tableD ON tableD.SomeColumn=TableA.someColumn
谢谢