Re: Use of DISTINCT in INNER JOIN
One possible workaround I can see is to put it in a sub-query, with the outer query returning all the columns required:
SELECT col1, col2
FROM tab1
WHERE col1 IN
(
SELECT DISTINCT a.col1
FROM tab1 a INNER JOIN tab2 b
ON a.col1 = b.col1
WHERE a.col1 in ('value1', 'value2')
ORDER BY a.col1
)
LIMIT 10
;
Subject
Views
Written By
Posted
69763
March 24, 2009 12:07PM
Re: Use of DISTINCT in INNER JOIN
11217
March 24, 2009 02:00PM
6953
March 25, 2009 07:01PM
6665
March 27, 2009 05:20AM
5887
March 27, 2009 10:01AM
6845
March 28, 2009 02:02AM
4714
March 28, 2009 03:53PM
5920
April 01, 2009 03:36AM
6193
April 02, 2009 12:16AM
5671
April 02, 2009 06:29AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.