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 RUNSTATS?
What information can you find in SYSIBM.SYSLINKS table?
What is schema in db2?
What is lock escalation?
What is db2?
What does reorg do in db2?
Define data page.
select * from orders where odate between '2010-01-01'and '2010-03-31' How do u fetch this into cursor?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
What is the clustering index in the db2 database?
Give the name of some fields form sqlca.
For Null indicator we have 3 values 0,-1,-2. 0->Not nulll -1->Null -2->Value truncated If ther is any possibility to have any positive value other than 0 in Null indicator.If it is so then when we will get and what is the value?