MySQL: Query and join two tables

前端 未结 4 1769
灰色年华
灰色年华 2021-01-23 03:17

I have two tables that I believe I want to JOIN. I\'m very new to this and am not completely sure…

The first table is called venues with the variables <

4条回答
  •  逝去的感伤
    2021-01-23 04:03

    This will join the two tables and print out the venues which matches the attributes (option, value) in venue_terms:

    SELECT v.* FROM venue v, venue_terms vt
    WHERE v.id = vt.venue
    AND vt.option = 1 
    AND vt.value = 10
    

提交回复
热议问题