View Single Post
  #2 (permalink)  
Old 07-01-09, 10:00
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by Vaibhav Vyas
So how i can compare that?
Code:
SELECT ...
  FROM source
INNER
  JOIN destination
    ON destination.somecolumn = source.comecolumn
 WHERE source.smallintcolumn = destination.integercolumn
the WHERE clause will evaluate as TRUE or FALSE depending on whether the comparison is equal or not equal

this query will therefore return all matching rows where they are equal

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book

Last edited by r937; 07-01-09 at 10:04.
Reply With Quote