Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Receive value from one table by an ID from another table

I have 2 tables: users, requests
The table users contains: id, name, email….

The table requests contains: id, id_user, date…..

How can I use the column id_user to get the name of the user from the table users?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

So I want to get the name with the id_user from table users.

>Solution :

select requests.id_user ,
             users.name 
from users 
join requests on users.id = requests.id_user 
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading