Combine 2 tables

Hi there,

I am absolutely a newbie at SQL and need to finish the following task:

I have to tables in a database on our webserver with different columns,the column "product-id" is in both tables.

Now I have to combine both and the result has to be exported to an Excel worksheet.

The export is no problem,but the first part is difficult for me.
All help welcome



Use alias (something like this where table 1 is using alias name "a" and table2 is using alias name "b")

select a.[product-id]
  from table1 as a
       inner join table2 as b
               on b.field_to_join=a.field_to_join