[ORA] Oracle Distinct 문제..

ORACLE | 2008. 3. 22. 21:54
Posted by Haronoid
최근 Distinct 가 행의 정렬 순서를 바꾼다는 사실이 발견..
2중 구조의 Select문에서 내부에 Order by 한 내용을 바깥에서 Distinct를 사용하면,
Order by 내용은 무시 된다.

Ex)
select distinct 1
from (
select 1 from dual
union all
select 3 from dual
union all
select 4 from dual
union all
select 2 from dual
union all
select 5 from dual
union all
order by 1
)
 
블로그 이미지

Haronoid

기본적으로 프로그래밍 관련 메모를 중점으로 합니다. 자세한 설명이 결여되어 있을 가능성이 있습니다.

카테고리

분류 전체보기 (29)
프로그래밍 기본 (1)
VB&VBA (1)
JAVA (0)
ORACLE (10)
WidnowsCommandLine (2)
Excel (1)
Windows (1)
.NET (6)
MS SQL (6)