Re: [firebase-br] Diferenças entre left outer join e left join

Fernando Reis Guimarães fernandobhz em gmail.com
Seg Nov 27 09:49:35 -03 2006


O.k...

Obrigado mario...

Então pelo que entendi usar ou não o outer dá na mesma né...

Valew...

So não conhecia o full join, legal saber dele também...

T+

Em 26/11/06, Mario <brujeria em task.com.br> escreveu:
>
> Desculpe, sobre o ingles mas vamos la:
>
> Na mesma página, lá do google temos:
>
> Use a LEFT JOIN operator to create a left outer join. Left outer joins
> include all of the records from the first (left) of two tables, even if
> there are no matching values for records in the second (right) table.
>
> Use a RIGHT JOIN operator to create a right outer join. Right outer
> joins include all of the records from the second (right) of two tables,
> even if there are no matching values for records in the first (left)
> table.
>
> Use a FULL JOIN operator to create a full outer join. Full outer joins
> include all of the records from both tables, even if there are no
> matching values for records in the other table.
>
> To combine records disallowing NULL values on any side of a join, use an
> INNER JOIN operator.
>
> Portanto:
> LEFT OUTER JOIN = LEFT JOIN
> RIGHT OUTER JOIN = RIGHT JOIN
> FULL JOIN = FULL OUTER JOIN
>
> Apenas o INNER JOIN existe para fazer referencia somente quando houver
> cruzamento.
>
>
> Quando falei sobre testar era, vc tentar usar: LEFT INNER JOIN ou RIGHT
> INNER JOIN ou FULL INNER JOIN.
> Você verá que o console SQL retornará erro!
>
> Até mais,
> Mario H.
>
>
>
> Em Dom, 2006-11-26 às 18:47 -0200, Fernando Reis Guimarães escreveu:
> > Bom, você me prestou um grade serviço traduzinho isso ai.. Porque ingles
> sei
> > so o básico...
> >
> > Agora Mario, dai vem minha dúvida:
> >
> > ele so pegara AUTORES quem tem
> > > PUBLICAÇÔES.
> > >
> >
> > isso não seria INNER JOIN?
> >
> > quando falamos em left queremos dizer...
> > pega todo mundo da esquerda mesmo que nao tenha correspondente na
> direita...
> > certo?
> >
> > agora se eu usar o OUTER vira um INNER?
> >
> > é isso mesmo que você quis dizer?
> >
> > Em 26/11/06, Mario <brujeria em task.com.br> escreveu:
> > >
> > > Ola,
> > >
> > >
> > > Como este é um assunto de SQL e não propriamente de FB, eu respondi a
> > > referencia.
> > > Eu fui direto ao assunto pq isto já tem de sobra na internet, todos
> > > temos que pesquisar e a lista deve focar em FB!
> > > Alem do mais, teste!!!!!
> > >
> > > Nao de o PEIXE, ensine a PESCAR!
> > >
> > >
> > > Mas se vc for no primeiro site da pesquisa google, la tem:
> > >
> > > SELECT a.au_fname, a.au_lname, p.pub_name
> > > FROM authors a LEFT OUTER JOIN publishers p
> > >     ON a.city = p.city
> > > ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC
> > >
> > >
> > > The LEFT OUTER JOIN includes all rows in the authors table in the
> > > results, whether or not there is a match on the city column in the
> > > publishers table. Notice that in the results there is no matching data
> > > for most of the authors listed; therefore, these rows contain null
> > > values in the pub_name column.
> > >
> > >
> > >
> > > Traduzindo:
> > > LEFT OUTER JOIN inclue TODOS os autores, mesmo aqueles que nao tem
> > > referencias a PUBLICAÇÔES, sendo os atributos de PUBLICAÇÔES posto
> como
> > > NULL.
> > >
> > > Portanto se vc nao usar o OUTER, ele so pegara AUTORES quem tem
> > > PUBLICAÇÔES.
> > >
> > >
> > > Valeu
> > > Mario H.
> > >
> > > Em Dom, 2006-11-26 às 17:21 -0200, Fernando Reis Guimarães escreveu:
> > > > Bem amigo, eu também o fiz, só que achei muita coisa boba qu
> realmente
> > > não
> > > > ajudou...
> > > > Pesquisei nas mensagens antigas e tem uma discursão e não
> concluisiva...
> > > >
> > > > Em 26/11/06, Mario <brujeria em task.com.br> escreveu:
> > > > >
> > > > > Ola,
> > > > >
> > > > > entrei no google e digitei:
> > > > > "left outer join" difference "left join"
> > > > >
> > > > > Na primeira página já tem discussão completa de outer e inner, bem
> > > como
> > > > > das demais (left,right,full).
> > > > >
> > > > > Valeu
> > > > > Mario H.
> > > > >
> > > > > Em Dom, 2006-11-26 às 03:52 -0200, Fernando Reis Guimarães
> escreveu:
> > > > > > Salve lista...
> > > > > >
> > > > > > Pesquisei nas mensagens antiga mas não obtive resultado....
> > > > > >
> > > > > > Qual a diferença entre o left outer join pro left join?
> > > > > >
> > > > >
> > > > >
> > > > > ______________________________________________
> > > > > FireBase-BR (www.firebase.com.br) - Hospedado em
> www.locador.com.br
> > > > > Para editar sua configuração na lista, use o endereço
> > > > > http://mail.firebase.com.br/mailman/listinfo/lista_firebase.com.br
> > > > > Para consultar mensagens antigas: http://firebase.com.br/pesquisa
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > ______________________________________________
> > > FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br
> > > Para editar sua configuração na lista, use o endereço
> > > http://mail.firebase.com.br/mailman/listinfo/lista_firebase.com.br
> > > Para consultar mensagens antigas: http://firebase.com.br/pesquisa
> > >
> >
> >
> >
>
>
> ______________________________________________
> FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br
> Para editar sua configuração na lista, use o endereço
> http://mail.firebase.com.br/mailman/listinfo/lista_firebase.com.br
> Para consultar mensagens antigas: http://firebase.com.br/pesquisa
>



-- 
Atenciosamente,
Fernando Reis Guimarães.

Contatos
fernando em fernandobhz.com
http://www.fernandobhz.com
Celular 9213-3727.



Mais detalhes sobre a lista de discussão lista