1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to SQL

Connected

Exercise

VIEWing your query

You've worked hard to create the below SQL query:

SELECT DISTINCT author AS unique_author
FROM books;

What if you'd like to be able to refer to it later, or allow others to access and use the results?

The best way to do this is by creating a view. Recall that a view is a virtual table: it's very similar to a real table, but rather than the data itself being stored, the query code is stored for later use.

Instructions 1/2

undefined XP
    1
    2
  • Create a view called library_authors.