CREATE-VIEW — Create a database view.Function
name
The name of the view as a string, symbol or SQL expression.
database
A database object which defaults to *default-database*.
as
A symbolic SQL query expression.
column-list
A list.
with-check-option
A Boolean.
Creates a view called name
in
database
which defaults to
*default-database*. The view is created using
the query as
and the columns of the view
may be specified using the column-list
parameter. The with-check-option
is NIL
by default but if it has a non-NIL
value, then all
insert/update commands on the view are checked to ensure that
the new data satisfy the query as
.
(create-view [lenins-group] :as [select [first-name] [last-name] [email] :from [employee] :where [= [managerid] 1]]) => (select [*] :from [lenins-group]) => (("Josef" "Stalin" "stalin@soviet.org") ("Leon" "Trotsky" "trotsky@soviet.org") ("Nikita" "Kruschev" "kruschev@soviet.org") ("Leonid" "Brezhnev" "brezhnev@soviet.org") ("Yuri" "Andropov" "andropov@soviet.org") ("Konstantin" "Chernenko" "chernenko@soviet.org") ("Mikhail" "Gorbachev" "gorbachev@soviet.org") ("Boris" "Yeltsin" "yeltsin@soviet.org") ("Vladimir" "Putin" "putin@soviet.org")), ("first_name" "last_name" "email")