how to get duplicate records from tables?write qurey for this?
Answers were Sorted based on User's Feedback
Answer / anshuman
Select column_name1,column_name2
from table_T
group by column_name1 having count(*)>1
it will give all the duplicates value of column_name1
| Is This Answer Correct ? | 28 Yes | 7 No |
Answer / mahesh babu
select column_name,count(*) from table_name group by
column_name having count>1.
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / naresh k
select * from table_name;
The above qurey get duplicate record also because the
database store records like multi-set..
if we want get distinct records then use following query.
select distinct(attribute_name) from table name
| Is This Answer Correct ? | 0 Yes | 15 No |
Answer / pandu
To get the duplicate records in a table use the query
Select distinct(deptno) from emp;
reply any one to me am i correct.
| Is This Answer Correct ? | 2 Yes | 26 No |
What is the connection string to connect to the DB2 Database ?
Can i insert bulk records into a db2 table using qmf of spufi only............!!!
What is difference between isnull and coalesce?
What is the purpose of rollback and commit?
How can you compare table column after update and before update?
Describe the elements of the SELECT query syntax?
What is a buffer pool?
I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.
0 Answers ITC Infotech, Syntel,
Why db2 is called db2?
What is DCLGEN ?
Mention the different locking levels that are available in db2.
What is the COBOL picture clause of the following DB2 data types: DATE, TIME, TIMESTAMP?