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 |
How is deadlock resolved?
What is sqlca?
when we are tying to update a table having 100 rows. if the program abends when updating 51 row . how to start updating again from the 51 row .what was the logic
What statistic will tell the DBA how must space can be reclaimed from dropped table spaces on the next reorg run?
Give the name of some fields form sqlca.
What is a view? Why use it?
What is meant by the attachment facility?
What is the maximum length of sqlca?
What is plan in cobol db2?
how we will do null data selection in cobol-db2 program
Can any one tell me about Restart logic in DB2.
how 2 resolve the -311 sqlcode