[求助]如何 取两列中 每行最小的值 ? select a.bj,b.bj ,case when (a.bj>=b.bj) then b.bj else a.bj end as minbin from tablea a,tableb b where a.xm=b.name; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select a.bj,b.bj,case when a.bj>=b.bj then a.bj else b.bj endfrom tablea a,tableb b where a.xm=b.name; select a.bj, b.bj, case when a.bj>b.bj then b.bj when a.bj<b.bj then a.bj else a.bj endfrom tablea a,tableb b where a.xm=b.name; 求一SQL 语句,环境 ms sql 2005 一高难度存储过程代码 ~ 在线等 怎样用Tsql 把表中的某个字段的所有数值串接成字符串? 一道面试题,请帮忙看看 怎样将多个作业一起调用 求助:使用LogExplorer一定要在原来的服务器上吗???把数据库和日志附加到别的服务器上行吗? 关于主键和外键的求助!!! 函数和存储过程的本质区别究竟是什么? 关于insert into...select 语句 求教如何写脚本语言创建数据库、表 循环插入表,多字段会很慢 分页存储过程里的print @sql不知道为何打印不出来
select a.bj,b.bj,case when a.bj>=b.bj then a.bj else b.bj end
from tablea a,tableb b where a.xm=b.name;
select a.bj,
b.bj,
case when a.bj>b.bj then b.bj
when a.bj<b.bj then a.bj
else a.bj
end
from tablea a,tableb b
where a.xm=b.name;