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
What is the difference between stored procedure and view?
What are different sql data types?
How to return multiple rows from the stored procedure?
What is character functions?
how to use like conditions? : Sql dba
how to decrement dates by 1 in mysql? : Sql dba
What is raw datatype in sql?
How many types of relationship are there?
Why do we need cursor in pl sql?
What is an ndf file?
Why do we use cursors?
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
How to connect a sql*plus session to an oracle server?
How do you add a column to a table?
Why do we need view in sql?