如何将一个表中的某一个字段值相同的记录查出来

wong99 2002-11-28 11:36:34
如何将一个表中的某一个字段值相同的记录查出来
...全文
29 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
pengdali 2002-11-28
  • 打赏
  • 举报
回复
呵呵!多种解法!
pengdali 2002-11-28
  • 打赏
  • 举报
回复
select *
from 表
where 列 in
(select 列 from(select 列,count(列) a from 表 group by 列) AA where a>1)
蓝天 2002-11-28
  • 打赏
  • 举报
回复
select * from yourtable where yourtable in (select yourcolumn from yourtable group by yourcolumn having count(*) >1)
蓝天 2002-11-28
  • 打赏
  • 举报
回复
select yourcolumn from yourtable group by yourcolumn having count(*) >1
cqcjoe 2002-11-28
  • 打赏
  • 举报
回复
select *
from employee
where job_id in (select distinct job_id from employee)

34,593

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧