Hi, i have 2 tables
Table 1 has info regarding Contracts
Table 2 has info regarding aditional data for some of the Contracts in table 1
I need a query that will show me all contracts in table 1 and the aditional info from table 2 tied to the appropriate contract. (the query that i have now with data selected from both tables only shows me the contracts form table 1 which have a link to data in table 2)
Hope u understand what i'm trying to do.
Last edited by ciprian; 09-13-2011 at 04:37 AM.
i think i need to use left join instead of inner join
PS i would have deleted the thread but can't find the button to do that
Hi Ciprian,
The join you are looking for is a left join, the syntax would be as below:
Have a look here for an explanationSELECT column_name(s) FROM table_name1 LEFT JOIN table_name2 ON table_name1.column_name=table_name2.column_name
http://www.w3schools.com/sql/sql_join_left.asp
thanks Kyle, for the quick reply
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks