日期:2014-05-16 浏览次数:20495 次
declare @t varchar(20) set @t = 'TEST1' --输入值 if @t = 'TEST1' select * from table1 else if @t = 'TEST2' SELECT * FROM TABLE2 ELSE (SELECT * from table1 union all select * from table2)