Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. where
  2. tablea.field1 >= 4 and tableb.field3 = 'male'
  3.  
  4. CREATE TABLE parent
  5. (pID NUMBER,
  6. numberkids INTEGER)
  7.  
  8. CREATE TABLE kids
  9. (kID NUMBER,
  10. father NUMBER,
  11. mother NUMBER,
  12. gender VARCHAR(7))
  13.  
  14. select
  15. p.pid
  16. from
  17. kids k
  18. inner join parent pm on pm.pid = k.mother
  19. inner join parent pf on pf.pid = k.father,
  20. parent p
  21. where
  22. p.numberkids >= 2 and k.gender 'male'
  23. /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement