How to select the duplicate rows from a table?
Answers were Sorted based on User's Feedback
Answer / channabasappa
select field name from tablename where group by field name
having count(field name)>1;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mahesh vasudevan
Select <col-name> from table A1 and A2
where A1.Col = A2.Col.
This should be an inner join. Then you are finding the
intersection of the key values...if you want to find the
duplicates for all matching column of the rows code AND
condition for join with all those columns.....by the way
there are different easy ways to find it. but this is one of
the way.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pandu
select distinct from <field name> from <table name>
| Is This Answer Correct ? | 0 Yes | 3 No |
What is plan in cobol db2?
db2 maintains information about the data... a.in tables. b.in a set of tables known as db2 catalog. c.in db2 database. d.none of the above.
in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?
What does the sqlcode of -818 pertain to?
how to resolve -805. give clear explination for that
What is reorg?
What is multi row fetch in db2?
Is db2 a programming language?
Outputs of explain are with matchcols = 0. What does this signify?
What are the various data types available in db2?
What is concurrency?
What is table space in db2?