GuilhermeRamalho

Querys Central Apostas

Jul 12th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.40 KB | None | 0 0
  1. -- Retorna o nome do usuário e a regional para a qual o mesmo tem permissão de acesso
  2. SELECT tb_usuario.nome AS nome_usuario, tb_regional.nome AS regional_permitida
  3. FROM tb_usuario
  4. INNER JOIN tb_regional_usuario ON (tb_usuario.id = tb_regional_usuario.tb_usuario_id)
  5. INNER JOIN tb_regional ON (tb_regional_usuario.tb_regional_id = tb_regional.id)
  6. WHERE tb_usuario.id = 33
  7. ORDER BY tb_regional.nome
Advertisement
Add Comment
Please, Sign In to add comment