Answer the question
In order to leave comments, you need to log in
How to do a join in one SQL query?
Table users:
id | login
Table messages:
id | sender_id | receiver_id | text | date
How to make in one request, through INNER JOIN connection, so that in the end it turns out to make a selection from 2 users (sender and recipient). At the moment, here is a request that receives only the sender's login:
SELECT * FROM users INNER JOIN messages ON users.id = messages.sender_id
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question