Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
3. What views are


Excellent! We have just created the view. How can we use it? Well, a view is a virtual table: it has its name, some columns and rows, like any other table. The view data is not stored physically, every time you retrieve data from the view, the database reruns the underlying query.

We can use a view in our queries just as we use other tables. Take a look:

FROM course_lecturer;

The above query will select all the information for courses together with their lecturers.


Show all information for current courses only. Use the view course_lecturer. A current course is a course which has a date in the field course_next_edition (i.e. the field is not null).

Stuck? Here's a hint!


FROM course_lecturer 
WHERE course_next_edition IS NOT NULL;