how do you count the duplicate records in a table

Answer Posted / sravan

Hi here is another way to solve this

SELECT NAME, COUNT(NAME) FROM TABLE_NAME
WHERE NAME IN (SELECT NAME FROM TABLE_NAME
GROUP BY NAME
HAVING COUNT(NAME)>1)
GROUP BY NAME;

thanks

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what does the t-sql command ident_current does? : Transact sql

546


Give the order of sql select?

616


What do you think about pl/sql?

535


First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.

1144


Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?

539






What are operators available in sql?

591


Advantages and disadvantages of stored procedure?

583


What is varchar sql?

620


what is data integrity? : Sql dba

596


what is a relationship and what are they? : Sql dba

553


What is pivot in sql?

514


What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql

543


what is normalization? : Sql dba

565


how to concatenate two character strings? : Sql dba

557


explain the difference between delete , truncate and drop commands? : Sql dba

553