/kb

personal knowledgebase

Join tables in MySQL

without comments

Join three tables (shows, bands, locations) in MySQL:

select * from shows 
left join (bands, locations) ON 
(bands.id = shows.band_id and locations.id = shows.location_id);

For further information see MySQL Reference manual 12.2.7.1. JOIN Syntax.

Theoretically related posts

Written by HÃ¥vard Grimelid

April 21st, 2008 at 9:45 am

Posted in Server

Tagged with ,

Leave a Reply