求一简单的SQL语句,马上结贴! 表1:字段1AABABBB求一SQL语句可以实现:表2字段1(A) 字段2(B)1 01 00 10 10 1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用select ..case.... when试试看 select case 字段1 when 'A' then 1 else 0 end as [字段1(A)], case 字段1 when 'B' then 1 else 0 end as [字段1(B)]into 表2 from 表1 select * from (case 表1.字段1 when a then "1" else "0") as 字段1(A), (case 表1.字段1 when b then "0" else "1") as 字段1(b)) a select case 字段1 when 'A' then 1 else 0 end as [字段1(A)], case 字段1 when 'B' then 1 else 0 end as [字段1(B)]into 表2 from 表1这个结果就非常准确 求一sql语句 求SQL语句修改text列 求sql 问题HTTP 错误 500.0这几天一直无法解决,请求达人帮助 【求助】如何移动.ndf分区文件到另一个目录? 请问如何在触发器中获得数据库最新行(最后一次插入行) 单据编号根据相应规则自动生成,格是:PO0509020001,同时保存时单号重复,如何解决! 将 varchar 值 'b' 转换为数据类型为 int 的列时发生语法错误。怎么解决啊? 求助:关于利用数据库游标检索数据加密后并更新的问题?? 如果你能解决该问题,将得到一个完整系统的源码及全部设计文档(分析、设计)!!! 纪录变横向的写法 求一句sql语句
case 字段1 when 'A' then 1 else 0 end as [字段1(A)],
case 字段1 when 'B' then 1 else 0 end as [字段1(B)]
into 表2 from 表1
case 字段1 when 'A' then 1 else 0 end as [字段1(A)],
case 字段1 when 'B' then 1 else 0 end as [字段1(B)]
into 表2 from 表1这个结果就非常准确