Next Prev Up Top Contents Index

create-table

Function
Summary

Creates a table.

Package

sql

Signature

create-table name description &key database =>

Arguments

name

The name of the table.

description

The table properties.

database

A database.

Values

None.

Description

The create-table function creates a table called name and defines its columns and other properties with description . The argument description is a list containing lists of attribute-name and type information pairs.

The default value of database is *default-database* .

Example

The following code:

(create-table [manager]
  '(([id] (char 10) not-null)
    ([salary] (number 8 2))))

is equivalent to the following SQL:

CREATE TABLE MANAGER
   (ID CHAR(10) NOT NULL,SALARY NUMBER(8,2))
See also

drop-table


LispWorks Reference Manual (Windows version) - 14 Dec 2001

Next Prev Up Top Contents Index