daily pastebin goal
9%
SHARE
TWEET

Exemplo de SQL com INNER JOIN

a guest Jan 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clientes
  2. - id 3
  3. - nome_cliente - Marcos
  4.  
  5. funcionarios
  6. - id 5
  7. - nome_funcionario - Anthonella
  8.  
  9. servicos
  10. - id
  11. - idcliente - 3
  12. - idfuncionario - 5
  13.  
  14. SELECT servicos.*, clientes.nome_cliente, funcionarios.nome_funcionario FROM servicos
  15. INNER JOIN clientes ON servicos.idcliente = clientes.id // todas as infos do cliente
  16. INNER JOIN funcionarios ON servicos.idfuncionario = funcionarios.id // todas as infos do funcionário
  17. WHERE servicos.idcliente = 3 AND servicos.idfuncionario = 5
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top