0
插入一個普通的表,不同的場景如果存在避免多,否則,如果對不同的退出語句中使用聯接內部
如:
if exists(select id from tablename where id =1)
insert into Temp
select * from tbl inner join ........
else if exists(select id from tablename where id=2)
insert into Temp
select * from tb2 inner join ........
else if exists(select id from tablename where id=3)
insert into Temp
select * from tb3 inner join ........
....
它就像使用其他條件加盟不同的表不同的ID的... 現在我想編寫一個單一的查詢沒有這其他如果,否則如果...但基於ID值相應的選擇語句應該被稱爲