The c_view1.sql command file
The following command file creates a view called custview on
a single table and grants privileges on the view to public.
It includes the WITH CHECK OPTION keywords to verify that any changes
made to underlying tables through the view do not violate the definition
of the view.
CREATE VIEW custview (firstname, lastname, company, city) AS
SELECT fname, lname, company, city
FROM customer
WHERE city = 'Redwood City'
WITH CHECK OPTION;
GRANT DELETE, INSERT, SELECT, UPDATE
ON custview
TO public;