Hello,
Good evening,
In a Db2 table, I have 10 rows and I want to compare each of the record with the remaining records. How to achieve this?
DB2 table comparison within the same table.
-
- New Member
- Posts: 7
- Joined: Thu Apr 24, 2014 12:00 pm
- Anuj Dhawan
- Founder
- Posts: 2824
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: DB2 table comparison within the same table.
Without knowing a lot of details - you most likely looking for an inner join in DB2. Like below example:
Would recommend to read further on 'inner join in DB2'. If that does not help, please add more details to your question.
Code: Select all
SELECT column_name(s)
FROM table1 t1 INNER JOIN table1 t2
on t1.column1 = t2.column1;
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute