From the course: MySQL Essential Training

Unlock this course with a free trial

Join today to access over 23,700 courses taught by industry experts.

Joining queries across tables

Joining queries across tables - MySQL Tutorial

From the course: MySQL Essential Training

Joining queries across tables

- [Bill] Hi, I'm Bill Weinman. The ability to combine results from related rows and different tables is an important part of using a relational database system. In MySQL, this is accomplished with the JOIN clause. For this lesson, we'll use the album database, and here I've copied some statements from the Chapter 1 exercise file, so I'll go ahead and I'll execute the USE album statement, and then we'll look at these two tables in the album database. There's an album table which has information about albums, and a track table which has information about each of the tracks on each of the albums. And so the album table looks like this. I can expand this just a little bit. You can see title, artist, label, released, and there's of course an ID column, which is the primary key. And then the track table, I'm going to expand this a little more. You can see that the track table has all of the tracks for each of those albums. And you'll notice there's an ID column, which is the primary key for…

Contents