There are also a lot of cases where you can get rid of a subquery. Consider
the following
SELECT DISTINCT emplid
FROMemp_history eh1
WHERE salary > 10;
SELECT emplid
FROM emp_history eh1
WHERE rowid = (SELECT MAX(rowid)
FROM emp_history eh2
WHERE eh1.emplid = eh2.emplid
"Toepke, Kevin M" wrote:
>
> As I see it, there are several questions here:
> 1) Can I use DISTINCT to do a sort?
> Yes and no. In Oracle 7, a DISTINCT does an implicit sort
> In Oracle 8, it does a "SORT NOSORT" operation. Dupicates are
> removed but the output is NOT guaran
As I see it, there are several questions here:
1) Can I use DISTINCT to do a sort?
Yes and no. In Oracle 7, a DISTINCT does an implicit sort
In Oracle 8, it does a "SORT NOSORT" operation. Dupicates are
removed but the output is NOT guaranteed to be in sorted order.
2) Ho
UNIQUE is just another way of saying DISTINCT. They do the same thing.
>>> [EMAIL PROTECTED] 06/20/01 02:26PM >>>
What about using UNIQUE
Select UNIQUE.
Seema Singh wrote:
> Hi
> In a sql stmt what will be the impact if we used DISTINCT clause and how we
> can overcomes on the performa
What about using UNIQUE
Select UNIQUE.
Seema Singh wrote:
> Hi
> In a sql stmt what will be the impact if we used DISTINCT clause and how we
> can overcomes on the performance bottleneck caused by DISTINCT.
> like ... SELECT DISTINCT A,B,C FROM TAB_1
> I want to get same output without
Hi
In a sql stmt what will be the impact if we used DISTINCT clause and how we
can overcomes on the performance bottleneck caused by DISTINCT.
like ... SELECT DISTINCT A,B,C FROM TAB_1
I want to get same output without using distinct?Is this possible?If, YES
then how?
Thanks in advance
-Seema
__