sql问题Orz
select a,b from table
出来结果是
a b
XXX xxx
请问怎样让a b两列能只用1个列名表示
如
c
XXX xxx
[解决办法]
select a+b as c from table
[解决办法]
select a+b as c
[解决办法]
select (case when a=某个条件 then a+b else a end),
case when a=某个条件 then null else b end
from tb
发布时间: 2013-01-01 14:04:19 作者: rapoo
sql问题Orz
select a,b from table
出来结果是
a b
XXX xxx
请问怎样让a b两列能只用1个列名表示
如
c
XXX xxx
[解决办法]
select a+b as c from table