Opa, Em 11 de janeiro de 2012 16:52, Shander Lyrio <[email protected]>escreveu:
> Em 11-01-2012 16:49, Wesley escreveu: > > Olá pessoal, > > > > talvez a dúvida é muito noob, mas sou iniciante. Como faço um sql para > > pegar registros duplicados na mesma tabela. > O que exatamente você quer fazer? Isso te ajuda? SELECT * FROM tabela UNION ALL SELECT * FROM tabela; SELECT * FROM tabela t1 CROSS JOIN tabela t2; > > Usando as cláusulas group by e having, ou group by + count + where > count > 1 > > Abraço, > > -- > Shander Lyrio > http://about.me/shander > > _______________________________________________ > pgbr-geral mailing list > [email protected] > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral > Abraços -- JotaComm http://jotacomm.wordpress.com
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
