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 Retrieve the data which are only duplicates within the SQL forums, part of the Databases category; How to retrieve the data which are only duplicates .... (ie, if have in "prasad" in the "ename" COLUMN four times, I have to retrieve only the prasad for 4 ...
|
|||||||
|
|||
|
Retrieve the data which are only duplicates
How to retrieve the data which are only duplicates .... (ie, if have in "prasad" in the "ename" COLUMN four times, I have to retrieve only the prasad for 4 times as my output)
Question asked by visitor prasad |
| Sponsored Links |
|
|||
|
Re: Retrieve the data which are only duplicates
select * from table_nm where column_nm in(select col_name from table_name group by col_nm having count(1)>1);
for example:- select * from emp where job_id in (select job_id from emp group by job_id having count(1) > 1); |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Retrieve data from emp table | Sampurna | SQL | 4 | 08-13-2008 08:07 AM |
| Retrieve the detail from emp | Geek_Guest | Oracle | 4 | 07-12-2007 07:20 AM |
| Phelix: music duplicates removal tool with acoustical matcher. | JobHelper | Geeks Lounge | 0 | 04-04-2007 04:30 AM |
| Help me retrieve my password | joel | MY SQL | 1 | 12-19-2006 02:53 AM |
| Retrieve a pdf document from database | Lokesh M | Database General | 5 | 12-18-2006 08:44 AM |