1:编写Sql语句,查询id重复3次以上的条目,表为Pramidname

先看建立的表:

SQL Server 笔试题总结

 

SQL语句: 直接使用一个子查询即可

select * from Pram
where id in(select id from Pram
group by id
having COUNT(id)>3)

 

结果:

SQL Server 笔试题总结

 

 


 

相关文章:

  • 2021-10-04
  • 2022-01-28
  • 2021-07-12
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2021-07-15
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2021-03-29
  • 2021-05-11
相关资源
相似解决方案