Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Your first view
3. Creating a view – exercise
How to use views
Summary

Instruction

Good job! Let's do another exercise, this time with a new table.

Exercise

You're going to work for a publishing house which specializes in textbooks. For now, they have a table called textbook that's defined like this:

CREATE TABLE textbook (
  id integer PRIMARY KEY,
  title varchar(64),
  subject varchar(32),
  retail_price decimal(5, 2),
  printing_cost decimal(5, 2),
  year integer
);

Your task is to create a view named biology_textbook which will select all columns from the textbook table for the subject 'Biology'.

Stuck? Here's a hint!

Here's the syntax:

CREATE VIEW ... AS
...;