帮忙看这这样的条件怎么写? select a from 表 where b>=aunionselect b from 表 where b<a 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select c=case when b>=a then a else b endfrom tablename 我说错了 应是在一个表里面ID a b 1 10 502 20 403 30 304 40 20 5 50 10结果ID a b c1 10 50 102 20 40 20 3 30 30 304 40 20 20 5 50 10 10 select *,case when a>=b then a else b end as cfrom youtablename select *,(case when a>=b then a else b end) as cfrom 表 select *,c=case when b>=a then a else b endfrom tablename--where --order by 那就是你在表中增加一个字段 c然后修改其的值update table set c=case when b>=a then a else b end 求1条DELETE语句,有难度! sql server 2005 自动备份 还是上次那个查询语句~~~~~~~~~~~~~~~~~~~~~~~~~~ sql中如何把一个数字转化为一个指定位数的串 2003上安装sqlserver2000的问题 如何对单表在SQL数据库间进行导入导出? 关于一个索引的问题,大家帮忙分析下 查询分析器中打开表的机制 急!!!!!!!!!!!!!!!!!!!!!!!!!!!! 关于查询速度问题 分区表怎么设置主键,求指点,谢谢 居然select 一个查询不行 webform ,vb.net ,textbox里的内容存到数据库后就不换行了。
when b>=a then a
else b
end
from tablename
ID a b
1 10 50
2 20 40
3 30 30
4 40 20
5 50 10结果
ID a b c
1 10 50 10
2 20 40 20
3 30 30 30
4 40 20 20
5 50 10 10
from youtablename
from 表
when b>=a then a
else b
end
from tablename
--where
--order by
然后修改其的值
update table set c=case when b>=a then a else b end