Question about SQL joins

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use SQL to return data from multiple tables at the same time.
My first table is keyed on SSN. This table has an ID field in it. I will
use this ID to find matching rows in 4 other tables. If any or all of the 4
tables do not have matching rows I still want to return a row from the
original table and anywhere a match was found.

I am using Visual Studio to create the stored procedure. From what I have
read the VS default is to create inner joins. Do I need to use a Left join
to acheive my goal?

Don
 
Yes, If you use a left join you will get all the data from the primary table
even if the secondary table do not have related rows.

Brad Shook
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top