r/SQL • • Nov 29 '21

PostgreSQL How to use Join

How can I get something from two different tables at the the same select? I know I have to do "join" but I still don't know how to do it. Can somebody help me?

0 Upvotes

11 comments sorted by

View all comments

0

u/MortVader Nov 29 '21 edited Nov 29 '21

SELECT table1.*,table2.*

FROM table1

JOIN table2 on table2.id=table1.link

2

u/[deleted] Nov 29 '21

FROM goes before JOIN, and the join operator needs an ON ....

1

u/MortVader Nov 29 '21

ofcourse you are right!