| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|||||||
| Oracle Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too. |
![]() |
|
|
LinkBack | Thread Tools | Rate Thread | Display Modes |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Jan 2007
Age: 27
Posts: 283
Thanks: 0 Thanked 2 Times in 2 Posts Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 4
|
Sql - I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.
Sql - I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.
|
|
|
|
|
|
#2 (permalink) | |
|
Junior Member
Join Date: Mar 2008
Age: 26
Posts: 1
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
|
Re: Sql - I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.
Quote:
from table_name group by name having count(name) > 1 Last edited by ketan_kashyap@yahoo.co.in; 10-03-08 at 02:24 PM. Reason: mistake |
|
|
|
|
|
|
#3 (permalink) |
|
Junior Member
Join Date: Sep 2008
Age: 24
Posts: 2
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
|
SELECT ID,COUNT(*) FROM EMP2 E WHERE ROWID >(SELECT MIN(ROWID) FROM EMP2 R WHERE E.ID=R.ID)GROUP BY E.ID
IF U HAVE BELOW TABLE EMP ID 10 10 20 20 20 |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| interview Q&A asked in winrunner | Spoorthi | Testing Tools & QA | 80 | 22-11-08 11:48 PM |
| Mega Free Download S/W Links A-Z | yathish | OTHERS | 513 | 30-09-08 02:49 PM |
| Some VBScript Functions.. | kiran2710 | Testing Tools & QA | 5 | 11-11-07 07:05 PM |
| Sql - How to display duplicate rows in a table? | radhika_btech | Oracle Interview / Technical Questions | 1 | 28-01-07 02:07 AM |
| SQL SERVER 2000 QUESTIONS.... | LALIT KUMAR | VB / ASP.NET Technologies | 2 | 16-12-06 06:29 PM |