一行数据拆成多行数据的问题!!! 想起来了,用Union可以,呵呵。期待其他答案 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select ID,'state1' as State from Schema where state1 = 1 union allselect ID,'state2' from Schema where state2 = 1 union allselect ID,'state3' from Schema where state3 = 1order by ID SQLSERVER 2005 中存储过程 不是有效的标识符。 SQL查询求助(急!!!) [DBNETLIB][ConnectionWrite (send()).]一般性网络错误。请检查网络文档。 Insert Statement: Mysql 怎么判断时间的? 订票系统 MSSQL最大用户数的问题 急!!!!如何进行批量加主键??? 请问如何删除SQL SERVER 2000?? 怎么得到本机Sql Server实例名称? 急!!!在线等! 关于视图的问题! 请tonny_yang(彩虹边的雨云)进来,谢谢你的回答
union all
select ID,'state2' from Schema where state2 = 1
union all
select ID,'state3' from Schema where state3 = 1
order by ID