Skip to content
Advertisement

Nested select from two tables in mysql

I have two tables

table A contain many ids, which one is related to the table B.

I have to make a query on the table A to select only some ids and then take the data from the table B using the selected ids from the table A

How can i do that? (MYSQL)

Advertisement

Answer

Based on your description, here is a simple structure of how the query might go, although I recommend you share some sample results & the desired output.

SELECT * FROM tableA
JOIN tableB
ON tableA.id_song == tableB.id_song
WHERE "your condition HERE"
6 People found this is helpful
Advertisement