1.Hibernate中的多表查询 1.1SQL中的多表查询 [交叉连接] select * from A,B; [内连接] 显示内连接:inner join(inner 可以省略) Select * from A inner join B on 条件; 隐式内连接: Select * from A,B where 条件; [外连接] 左外连接:left outer join Select * from A left outer join B on 条件; 右外连接:right outer jo…
--exists 结合 if else 以及 where 条件来使用判断是否有数据满足条件 select * from Class where Name like '%[1-3]班' if (not exists(select * from Class where len(Name)>=5)) select '满足条件' else select '不满足条件' --in not in 用来做范围判断 select * from Student where ClassId in(select Id…