sql语句 select distinct aa from table1 where id=1sql语句,使得选出来的aa字段值是1和2的查询结果都为1. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select distinct case when aa=1 then 1 when aa=2 then 1 else aa end from table1 where id=1 不懂!既然distinct了, select distinct aa from table1 where id = 1 and aa <> '2' 试试! select 1 as aafrom tablewhere id=1union allselect 2 as aafrom tablewhere id=1 SQL分组查询语句 求一条简单的sql语句 拜托了 sqlserver2005同步数据,接收数据库反范式,用冗余提高查询速度问题? 请教一个sql语句 请教:如何用“分析查询器”将*.sql的文件导到数据库中?给分30 sql同步 临时表的问题 能否用SQL语句实现将文本文件导成Sql_server的数据库表? 怎样设置一用户只对数据库中一个表的读权限? 为何我通过sql server访问access数据库老是出错? sql去除重复 简单问题!!!!!
from table
where id=1
union all
select 2 as aa
from table
where id=1