select * from tab a where exists
(select 0 from tab b where a.id=b.id)
0在这里没有意义 这样写可以提高查询速度 因为不用在展现真实数据
select * from tab a where exists
(select * from tab b where a.id=b.id)
与上边效果一样 上边的效率更高

查询速度能提高多少,等测试了再给结果

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2021-07-20
  • 2021-11-07
猜你喜欢
  • 2021-12-27
  • 2021-12-21
  • 2022-12-23
  • 2021-09-23
  • 2021-08-15
  • 2021-10-08
相关资源
相似解决方案