帮忙写个sql语句 数据库中有四个字段 id (主键) 字段A 字段B 字段C我现在要查询表里所有的A=1 或者 B=2 或者 C=3 的所有的数据 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from table where A=1 or B=2 or C=3 select * from table where A=1union allselect * from table where B=2union allselect * from table where C=3 select * from table where A=1 or B=2 or C=3? select * from tb where A=1 or B=2 or C=3 select * from tbwhere A=1union select * from tb where B=2union select * from tb where C=3 SELECT * FROM TB WHERE A=1 OR B=2 OR C=3 SELECT * FROM TB WHERE EXISTS(SELECT 1 FROM TB WHERE A=1) OR EXISTS(SELECT 1 FROM TB WHERE B=2) OREXISTS(SELECT 1 FROM TB WHERE C=3) select * from tb where A=1 or B=2 or C=3 select * from table where A=1 or B=2 or C=3 select * from tb where A=1 or B=2 or C=3 select * from YourTable where A=1 or B=2 or C=3 select * from tb where A=1 or B=2 or C=3select * from tb where A=1union select * from tb where B=2union select * from tb where C=3 select A,B,C FROM <table> where A =1 OR B=2 OR C=3 存诸过程如何写啊! delphi能获取存储过程中print的内容吗?如何做? 求sql 2008 磁盘过高出现的原因和解决办法, sp_addlinkedserver (Microsoft OLE DB Provider for DB2) 求助!!看看这个为什么有问题?? sql树形显示 一个SQL查询语句的问题~~~在线等.......(sql2000) 居然没有人回答的帖子———寒心了! sql语句中关键字Exists 与 in 的区别,看下列实例 SQLSERVER7中时间与DELPHI5中时间的奇怪现象 郁闷,请求指正 请教数据库创建语句
union all
select * from table where B=2
union all
select * from table where C=3
?
from tb
where A=1 or B=2 or C=3
union
select * from tb where B=2
union
select * from tb where C=3
EXISTS(SELECT 1 FROM TB WHERE A=1) OR
EXISTS(SELECT 1 FROM TB WHERE B=2) OR
EXISTS(SELECT 1 FROM TB WHERE C=3)
select * from tb where A=1 or B=2 or C=3
select * from table where A=1 or B=2 or C=3
select * from tb where A=1 or B=2 or C=3select * from tb where A=1
union
select * from tb where B=2
union
select * from tb where C=3