According to the index query results and conditions associated with the original table query

select
  t1.id
  , t1.t_class
  , t1.teacher
from
  t_class t1
  left join (select * from t_class where id=1) t2
    on t1.t_class = t2.t_class
    and t1.id = t2.id
where t2.id is null

FIG 1 is: table data

FIG 2 is: table structure

Figure 3: Query results

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/kukai/p/11129126.html