From the course: SQL Essential Training

Unlock the full course today

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

View introduction

View introduction

- Imagine if WSDA Music Management asked you to generate a report of all albums, their associated tracks, and the artists who sang them. A good approach would be to create a query that would join the three tables needed to get the data: the artist, album, and tracks tables. This is a great approach, but it's still a relatively complex query that involves joining three tables. Now, imagine that you had to generate this report every couple of weeks, which means rewriting this complex query again and again every time. There's got to be a better way. Luckily, there is, with something called Views in SQL. A view is simply a query that's saved and can be executed repeatedly or referenced by other queries. Views are helpful for a number of reasons, but convenience is definitely the main one. If you find yourself having to repeatedly write the same query, it may be a case where creating a view is the solution. In our…

Contents