Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. Table A (ManyToOne with Table B)
  2. Pk
  3. Number
  4. Fk
  5.  
  6. Table B
  7. Pk
  8. IsActive
  9.  
  10. select * from TableA as a left outer join TableB as b on b.pk=a.fk where b.isActive=false and a.Number < 15
  11.  
  12. select * from TableB as b left outer join TableA as a on b.pk=a.fk where b.isActive=false and a.Number < 15
  13.  
  14. select b from TableB as b left fetch join b.tableAList as a where b.isActive=true and a.xxxxx = something
  15.  
  16. where b.isActive=false and a.Number < 15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement