原生SQL多表查询
1.交叉连接(笛卡尔积)
select * from A, B
2.内连接
(1)隐式内连接
select * from A, B where b.aid = a.id
(2)显示内连接
select * from A inner join B on b.aid = a.id
3.外链接
(1)左外连接
select * from A left [outer] join B on b.aid = a.id
(2)右外连接
select * from A right [outer] join B on b.aid = a.id  
HQL多表查询
1.内连接(迫切)
from Customer c inner join c.linkMans
from Customer c inner join fetch c.linkMans
2.外链接
(1)左外连接(迫切)
from Customer c left join fetch c.linkMans
(2)右外连接(迫切)
from Customer c right join fetch c.linkMans
Hibernate之多表查询

相关文章:

  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-12-16
  • 2021-09-05
  • 2021-11-20
  • 2021-11-05
  • 2021-06-25
猜你喜欢
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
相关资源
相似解决方案