Next Previous Up Top Contents Index

16 The SQL Package

create-index

Function

Summary

Creates an index for a table.
Package

sql

Signature

create-index name &key on unique attributes database =>

Arguments

name

The name of the index.

on

The name of a table.

unique

A boolean.

attributes

A list of attributes.

database

A database.

Values

None.
Description

Thecreate-index function creates an index called name on the table specified by on. The attributes of the table to index are given by attributes. Setting unique tot includesUNIQUE in the SQL index command, specifying that the columns indexed must contain unique values.
The default value of unique isnil. The default value of database is*default-database*.
Example

(create-index [manager]
   :on [emp] :unique t :attributes '([ename] [sal]))

See also

drop-index
create-table

LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker