Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Distinct keyword in Oracle SQL within the SQL forums, part of the Databases category; Hi, I have one doubts in using the Distinct keyword to suppress the duplicates from the performance point of view. Why we should not use the Distinct Keyword in the ...
|
|||||||
|
|||
|
Distinct keyword in Oracle SQL
Hi,
I have one doubts in using the Distinct keyword to suppress the duplicates from the performance point of view. Why we should not use the Distinct Keyword in the Select statement. To suppress the duplicate, which one is the best to use to avoid the duplication. while using the Distinct keyword in select clause, I am getting an Performance problem. If any body knows, please let me know. Thanks in advance. Thanks, Saravanan.P |
| Sponsored Links |
|
|||
|
Re: Distinct keyword in Oracle SQL
Quote:
SQL> SELECT DISTINCT DEPTNO,JOB FROM EMP; DEPTNO JOB --------- --------- 10 CLERK 10 MANAGER 10 PRESIDENT 20 ANALYST 20 CLERK 20 MANAGER 30 CLERK 30 MANAGER 30 SALESMAN 9 rows selected. SQL> SQL> SELECT DEPTNO, JOB, COUNT(*) FROM EMP 2 GROUP BY DEPTNO,JOB; DEPTNO JOB COUNT(*) --------- --------- --------- 10 CLERK 1 10 MANAGER 1 10 PRESIDENT 1 20 CLERK 2 20 ANALYST 2 20 MANAGER 1 30 CLERK 1 30 MANAGER 1 30 SALESMAN 4 9 rows selected. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| difference bet unique and distinct | smitai | Oracle Certification | 4 | 3 Weeks Ago 08:35 AM |
| Load Distinct and Duplicate values to different targets | tanya123 | Data Warehousing | 1 | 02-25-2008 09:06 PM |
| ASM keyword in C language | Geek_Guest | C and C++ | 1 | 08-21-2007 02:01 AM |
| Alternative for SELECT DISTINCT to query 2 million records | Geek_Guest | SQL | 1 | 08-06-2007 09:29 AM |
| "like" keyword in oracle.. | psuresh1982 | Oracle | 5 | 12-22-2006 10:19 AM |