Next Previous Up Top Contents Index

16 The SQL Package

create-view

Function

Summary

Creates a view using a specified query.
Package

sql

Signature

create-view name &key as column-list with-check-option database =>

Arguments

name

The view to be created.

as

An SQL query statement.

column-list

A list.

with-check-option

A boolean.

database

A database.

Values

None.

Description

Thecreate-view function creates a view called name using the as query and the optional column-list and with-check-option. The column-list argument is a list of columns to add to the view. The with-check-option addsWITH CHECK OPTION to the resulting SQL.
The default value of with-check-option isnil. The default value of database is*default-database*.
Example

This example creates the viewmanager with the records in the employee table whose department is 50.
(create-view [manager] :as [select [*]
                            :from [emp]
                            :where [= [dept] 50]])

See also

create-index
create-table
drop-view

LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker