Reputation: 897
I am new to sql and I am trying to join 4 tables together but just cant get the hang of it. I am trying to do this with an inner join but I always get an syntax error with access.
SELECT *
from kdst,aufpos
inner join( artst inner join vert on kdst.vertreter = vert.vertnr)
on aufpos.artnr = artst.artnr;
This is my code but it does not work. I dont know what to do anymore, I hope someone can help me.
Upvotes: 0
Views: 4443
Reputation: 1415
Select *
From table1 t1
Inner join table2 t2 on t1.id = t2.fkid
Inner join table3 t3 on t1.id = t3.fkid
...
This is if you want to join multiple tables to the same parent table (table1
). Fkid
is the column of the foreign key field that refers to the primary key of the parent table.
Upvotes: 0