Creating a joined view


show more Creating a joined view provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training show less
please wait ...

Creating a joined view

A view can be a simple straight query or it can be a more complex joined query. The technique is the same. For this lesson, we will be using the album database. And I want to start with a query that shows all the tracks for each album with the duration as minutes and seconds. I'm just going to go ahead and copy and paste this out of the exercise files here. And grab it here starting at line 75. And I'll copy that and paste it into SID and press go.

And so you see we have a simple joined query with artist, album, track, track number, minutes and seconds, like that. And, there's the query where we can look at it in the editor. And you can see it's a pretty straight forward joint query, we've covered all of this stuff already. Now if I find this query very, very useful, I can save this as a view. So I can just say CREATE VIEW, call it joinedAlbum. As, and there's my query.

And then I can come down here and I can say SELECT * FROM joinedAlbum like that. Press Go. And there is my exac...

Creating a joined view
Video duration: 3m 23s 4h 24m Beginner

Viewers:

Creating a joined view provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training

Subject:
Developer
Software:
MySQL
Author:
please wait ...