 悬赏园豆:5
                [已关闭问题]
                悬赏园豆:5
                [已关闭问题] 
            
                 
        我在sql 2005 中 用case when ....then 的时候 我想在then 后面写sql 语句,不知道怎么写
求救
在then 后面写表达式是可以的,但是如果是写整条的sql语句,比如select 那么建议你根据条件分开成2条sql语句来执行
譬如:
if 1=2 then
select * from tb
else
select * from tb1
直接写sql是不行的。