how to retrieve only duplicate values in a table

Answer Posted / p.rajasekar

select count(<Duplicate_FieldName>),fees
from Table Name
group by <Duplcate_FieldName>
having count(<Duplicate_FieldName>)>1

Regards
P.Rajasekar

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the purpose of %type and %rowtype data types with the example?

758


What are the parameter modes supported by pl/sql?

747


how can we optimize or increase the speed of a mysql select query? : Sql dba

701


What is the left table in sql?

713


Which table is left in left join?

729


How to look at the current sql*plus system settings?

771


how to use 'mysql' to run sql statements? : Sql dba

754


What is cursor explain with example?

741


When to use inner join and left join?

703


What are sql data types?

750


How can you fetch first 5 characters of the string?

718


I need a function for a train ticket reservation please answer it thanks in advance

766


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

800


what are the types of subquery? : Sql dba

779


What is rownum and rowid?

776