how to retrieve only duplicate values in a table

Answer Posted / vijay_1994

select count (column_name),column_name from table_name group by column_name having count(column_name)>1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is before and after trigger?

727


Can we use update in sql function?

815


1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

1398


What is clustered and nonclustered index in sql?

763


What is the command used to fetch the first 5 characters of a string?

983


What are the usages of sql?

796


What is the meaning of disabling a trigger?

886


Which is better stored procedure or query?

764


Describe sql comments?

769


Can a commit statement be executed as part of a trigger?

843


Explain architecture of sql server notification services?

827


how can you create an empty table from an existing table? : Sql dba

907


what is a trigger in mysql? Define different types of trigger. : Sql dba

792


what is not null constraint? : Sql dba

783


Can we insert delete data in view?

770