A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw71/LW/html/lw-1134.htm below:

create-table

Description

The function create-table 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*.

type and extra-options are treated in a database-type specific way. Currently only database-type :mysql uses these options, as follows.

If type is not supplied, it defaults to the value (if any) of default-table-type that was supplied to connect. If extra-options is not supplied, it defaults to the value (if any) of default-table-extra-options that was supplied to connect.

type, if non-nil, is used as argument to TYPE in the SQL statement:

create table MyTable (column-specs) TYPE = type

except that if type is :support-transactions then create-table will attempt to make tables that support transactions, by using the type innodb.

extra-options (if non-nil) is appended in the end of this SQL statement.

When database-type is not :mysql, type and extra-options are ignored.

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))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4