Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
MatthewJapp
Starting Member
1 Post |
Posted - 2012-04-12 : 10:27:07
|
| I have 2 tablesLet's call them Table 1 and Table 2.Table 1 has 10 fields Table 2 has 10 fieldsI need to bring back everything in table 2, and 1 column from Table 1 called product_typejoined on lets say product_id which exists in both tables.How would this look in SQL 2008.First step of a long journey. Thanks guys (or girls) |
|
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2012-04-12 : 11:12:34
|
| select b.*,a.product_type from table1 ainner join table2 bwhere a.product_id=b.product_id;Hope this works. |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-04-12 : 11:21:46
|
Small correction:select b.*, a.product_typefrom table1 ainner join table2 bOn a.product_id = b.product_id; |
 |
|
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2012-04-12 : 12:17:07
|
| Ohh thanks Russell...continuous coding in pl/sql now a days... |
 |
|
|
|
|
|