Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. select distinct id_tabela1,
  2. tid_tabela2, tid_tabela3, tid_tabela4
  3. from tabela1 t1
  4. left join tabela2 t2 on t1.id_tabela1 = t2.tid_tabela2
  5. left join tabela3 t3 on t1.id_tabela1 = t3.tid_tabela3
  6. left join tabela4 t4 on t1.id_tabela1 = t4.tid_tabela4
  7. where...
  8.  
  9. id_tabela1 | tid_tabela2 | tid_tabela3 | tid_tabela4
  10. 1 | x | null | null
  11. 1 | z | null | null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement