how do you count the duplicate records in a table

Answer Posted / satheesh

SELECT COUNT(*)
FROM TABLE A
WHERE ROWID NOT IN (SELECT MAX(ROWID)
FROM TABLE B
WHERE A.COL1 = B.COL1);--UNIQUE COLUMN

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I write a sql query in pgadmin 4?

558


What is difference between my sql and sql?

532


What is assignment operator in pl sql?

572


what is acid property in database? : Sql dba

562


define sql delete statement ? : Sql dba

566






what is table? : Sql dba

576


What is use of trigger?

515


Explain the components of sql?

595


How to use sql statements in pl/sql?

586


Can we commit in trigger?

550


Explain correlated query work?

601


What is an emotional trigger?

520


What is recursive stored procedure?

608


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

1729


What is a temp table?

571