sqlserver2000 sql语句请教大家 有个表,2个字段,内容:A1 1A2 2A3 3想写个语句,怎么变成A1 3A2 1A3 2A1 2A2 3A3 1谢谢!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 A1 3A2 2A3 1 create table zh(c1 varchar(5), c2 int)insert into zh select 'A1', 1 union all select 'A2', 2 union all select 'A3', 3 update zh set c2=case c2 when 1 then 3 when 2 then 1 when 3 then 2 end select c1,c2 from zh/*c1 c2----- -----------A1 3A2 1A3 2(3 row(s) affected)*/ 如何做到只更新最近的一次记录 ? 怎样填写 sql server2005 服务器名称 每天1萜 下面的语句为什么错了啊? 一个基础问题,请指教 求救阿~先谢谢各位老大了~ 求存储过程!!!!在线等………… excel文件修复 ,急。。。。。公司急用 求一个sql语句 安装sqlserver2008(64位)时的错误,请前辈指点下! 关于字段拼接查询的问题,头疼了一下午了 求SQL语句
A2 2
A3 1
create table zh
(c1 varchar(5), c2 int)insert into zh
select 'A1', 1 union all
select 'A2', 2 union all
select 'A3', 3
update zh
set c2=case c2 when 1 then 3
when 2 then 1
when 3 then 2 end
select c1,c2 from zh/*
c1 c2
----- -----------
A1 3
A2 1
A3 2(3 row(s) affected)
*/