[rt-devel] DBIx::SearchBuilder DistinctQuery for Oracle

Martin Schapendonk martin.schapendonk at whitehorses.nl
Mon Mar 17 03:01:07 EST 2003


# a) DISTINCT queries aren't performed on a query against a single table. I
# can't see a reason why a select on a single table wouldn't return a
# distinct set of data - since that table on its own is distinct.
# If someone
# can give an example that disproves this please tell me.

If you do not select all attributes in a table OR if the table does not have
a primary key (which is unlikely) than a DISTINCT query on a single table
does make sense.

For example (not an RT example):
select distinct city from addresses;
makes sense.

Martin




More information about the Rt-devel mailing list