普通查询:

select t1.name,t1.age from table1 t1 
where t1.sid in
(
    select t2.id from table2 t2 where t2.yahei='嘿嘿'
)

优化后sql

select t1.name,t1.age from table1 t1 
where t1.sid in
(
    select t21d from
    (
        select t2.id as t21d from table2 t2 where t2.yahei='嘿嘿'
    ) as t21d
)

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-12-18
  • 2021-12-18
  • 2021-12-26
  • 2021-12-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 1970-01-01
  • 2022-12-23
  • 2022-02-25
  • 2021-12-11
相关资源
相似解决方案