ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  SQL Subqueries
Subject:   how to get distinct values from second table on comparing with first table
Date:   2008-04-02 23:40:27
From:   senthil.N
I'm having 2 tables as shown below


tb1 tb2
col1 col2 col1 col2
10 10000 10 10000
11 15000 15 20000
15 20000 13 21000
21 21000 23 10000


i need solution like this


col1 col2
10 10000
11 15000
21 21000
13 21000
23 10000


plz help me !