也许我们常常会遇到某一列由重复值,但我要需要只选出一条这样的记录该怎么办,以PUBS数据库为例
1 select * from titles as t
2 where not exists
3 (select * from titles where pub_id = t.pub_id and title_id < t.title_id)

相关文章:

  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2021-05-24
猜你喜欢
  • 2021-12-08
  • 2021-09-14
  • 2021-05-05
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案