Home > database >  How to get data from table A based on table B data
How to get data from table A based on table B data

Time:07-05

i have two tables A and B

Table A

enter image description here

Table B

enter image description here

I want to get all songs data which is matched to genre_id=1 from Table A, is there any query for that

CodePudding user response:

select name
from A
inner join B on A.song_id=B.song_id
where B.genre_id=1
  • Related