Oracle 5.0 Reference Manual page 1050

Table of Contents

Advertisement

[CHARACTER SET charset_name] [COLLATE collation_name]
| TEXT [BINARY]
[CHARACTER SET charset_name] [COLLATE collation_name]
| MEDIUMTEXT [BINARY]
[CHARACTER SET charset_name] [COLLATE collation_name]
| LONGTEXT [BINARY]
[CHARACTER SET charset_name] [COLLATE collation_name]
| ENUM(value1,value2,value3,...)
[CHARACTER SET charset_name] [COLLATE collation_name]
| SET(value1,value2,value3,...)
[CHARACTER SET charset_name] [COLLATE collation_name]
|
spatial_type
index_col_name:
col_name
index_type:
USING {BTREE | HASH}
reference_definition:
REFERENCES
[MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]
[ON DELETE reference_option]
[ON UPDATE reference_option]
reference_option:
RESTRICT | CASCADE | SET NULL | NO ACTION
table_options:
table_option
table_option:
{ENGINE|TYPE} [=]
| AUTO_INCREMENT [=]
| AVG_ROW_LENGTH [=]
| [DEFAULT] CHARACTER SET [=]
| CHECKSUM [=] {0 | 1}
| [DEFAULT] COLLATE [=]
| COMMENT [=] 'string'
| CONNECTION [=] 'connect_string'
| DATA DIRECTORY [=]
| DELAY_KEY_WRITE [=] {0 | 1}
| INDEX DIRECTORY [=]
| INSERT_METHOD [=] { NO | FIRST | LAST }
| MAX_ROWS [=]
| MIN_ROWS [=]
| PACK_KEYS [=] {0 | 1 | DEFAULT}
| PASSWORD [=] 'string'
| ROW_FORMAT [=] {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}
| UNION [=] (tbl_name[,tbl_name]...)
select_statement:
[IGNORE | REPLACE] [AS] SELECT ...
CREATE TABLE
table.
Rules for permissible table names are given in
the table is created in the default database. An error occurs if the table exists, if there is no default
database, or if the database does not exist.
The table name can be specified as
This works regardless of whether there is a default database, assuming that the database exists.
If you use quoted identifiers, quote the database and table names separately. For example, write
`mydb`.`mytbl`, not `mydb.mytbl`.
Temporary Tables
You can use the
the current connection, and is dropped automatically when the connection is closed. This means that
CREATE TABLE
[(length)] [ASC | DESC]
tbl_name
(index_col_name,...)
[[,] table_option] ...
engine_name
value
value
charset_name
collation_name
'absolute path to
'absolute path to
value
value
creates a table with the given name. You must have the
db_name.tbl_name
keyword when creating a table. A
TEMPORARY
Syntax
directory'
directory'
(Some legal select
statement)
Section 9.2, "Schema Object
to create the table in a specific database.
TEMPORARY
1030
[576]
privilege for the
CREATE
Names". By default,
table is visible only to

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents