Donate SIGN UP

SQL Join Tables

Avatar Image
Chris100682 | 16:40 Wed 26th Jul 2006 | Technology
3 Answers
SQL question for you.......

Table A has 110,000 records
Table B has 15,000 records

When I join table A to table B I only receive 15000 records back (them being original data from Table A matched with B)

How can I make it so that all 110,000 records are received regardless of a match with table B?????
Gravatar

Answers

1 to 3 of 3rss feed

Best Answer

No best answer has yet been selected by Chris100682. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
You need to do a LEFT JOIN TableB.... this will return NULL for non matched records.
yeah what he said
Question Author
Ok so how do i do a LEFT JOIN?

Can someone help me write this query?

An example of the two tables I want to join are as follows:

Table 1
src_prod_ofr
source_code

Table 2
Src_prod_ofr
CIT_code

1 to 3 of 3rss feed

Do you know the answer?

SQL Join Tables

Answer Question >>