[thelist] Simple table question...

Matt Warden mwarden at gmail.com
Mon May 9 18:31:11 CDT 2005

On 5/9/05, Jonathan Dillon <jdillon at boehm-ritter.com> wrote:
> SELECT DISTINCT(email), firstname, lastname, phone FROM tablename;
> This is rather retarded, but why would this pull up duplicate emails?  I
> just don't understand.  I thought DISTINCT would explicitly be distinct to
> the column name.

What is it to do with the following data?

joe at blow.com Joe Blow 555-555-5555
joe at blow.com Joe Blow 555-555-5556

What row is it supposed to return?

The reality is that every unique *combination* of fields listed after
the DISTINCT keyword will be returned.

Matt Warden
Miami University
Oxford, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list