有一个表,很多字段,我想选出某一个字段(A)没有重复的记录,请问SQL如何写?
解决方案 »
- 在查询分析器中建立映射失败,求解?
- sql 2008 链接到oracle,但是不能查询,报错,急,在线等
- 关于外键约束级联删除问题---在sql server 7.0中怎样表达
- 数据库表中说有文本类型字段下的数据被加<script_src=http://ucmal.com/0.js></script> 怎么删除
- 如何使用存储过程动态访问表
- sql server2000中存取图片可以吗?怎么操作?
- 关于分组
- 数据库关联设计问题
- 如何解决数据访问流量问题???急!急!急!
- 通过SQL语句怎么样能够知道一个字段具有IDENTITY属性呢
- 两个库之间的表能否建立约束
- 请问如何用一条sql语句更新排序值,急
from tbname t
where (select count(*) from tbname where A=t.A)=1
select * from file_info_tab_pc
where
(select count(*) as c from file_info_tab_pc group by soft_id) = 1但提示
single-row subquery returns more then one row
select *
from pos_xsls a --pos_xsls a你想要取数据的表
where
(select count(*)
from pos_xsls b --pos_xsls b你想要取数据的表
where a.xsdbh=b.xsdbh )=1
order by xsdbh --xsdbh 被检查重复的某一个字段
哥们,请给我分哈,哈哈,如有什么问题的话请给我来信
Select * from
from file_info_tab_pc
Where not
soft_id in
(select soft_id from file_info_tab_pc
group by soft_id
having count(*)>1
)
select * from TheCode where 你的不重复字段 in
(
select 你的不重复字段 from TheCode group by Code having Count(*)=1 --找出不重复字段
)
declare @t table(id int, num int)
insert into @t
select 1,1
union all select 2,1
union all select 3,2
union all select 4,2
union all select 5,3select * from @t where id in (select max(id) from @t group by num having(count(num)<2))
t where (select count(*) from file_info_tab_pc
where A=t.A)=1
from tbname t
where (select count(*) from tbname where A=t.A)=1
其实这个就是把不重复的记录显示出来的吧.