1878.5.4
by Brian Aker
Update documentation. |
1 |
CREATE TABLE
|
1900.2.4
by Stewart Smith
fix more docs warnings: underline/overline too short |
2 |
============
|
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
3 |
|
2222.2.1
by Mark Atwood
documentation work |
4 |
A CREATE statement in SQL creates an object inside of Drizzle. One of |
5 |
the most common CREATE commands is the CREATE TABLE command. |
|
1945.3.3
by Marisa Plumb
updates to a few sql docs |
6 |
|
2194.5.3
by Andrew Hutchings
Markup fixes |
7 |
.. code-block:: mysql |
8 |
||
9 |
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] table_name |
|
10 |
(create_definition, ...) |
|
11 |
[engine_options] |
|
2363.1.2
by Brian Aker
Fix documentation for replication. |
12 |
REPLICATE=[TRUE|FALSE] |
2194.5.3
by Andrew Hutchings
Markup fixes |
13 |
|
14 |
or: |
|
15 |
||
16 |
.. code-block:: mysql |
|
17 |
||
18 |
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] table_name |
|
19 |
[(create_definition, ...)] |
|
20 |
[engine_options] |
|
21 |
select_statement
|
|
2363.1.2
by Brian Aker
Fix documentation for replication. |
22 |
REPLICATE=[TRUE|FALSE] |
2194.5.3
by Andrew Hutchings
Markup fixes |
23 |
|
24 |
or: |
|
25 |
||
26 |
.. code-block:: mysql |
|
27 |
||
28 |
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] table_name |
|
29 |
LIKE different_table_name |
|
30 |
[engine_options] |
|
2363.1.2
by Brian Aker
Fix documentation for replication. |
31 |
REPLICATE=[TRUE|FALSE] |
2194.5.3
by Andrew Hutchings
Markup fixes |
32 |
|
33 |
create_definition
|
|
34 |
-----------------
|
|
35 |
||
36 |
::
|
|
1994.4.20
by Marisa Plumb
fixed build warnings |
37 |
|
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
38 |
column_name column_definition
|
1994.4.22
by Marisa Plumb
create table fixes, index toc adjustments |
39 |
[CONSTRAINT [symbol] ] PRIMARY KEY [index_type]
|
40 |
(index_column_name, ...)
|
|
41 |
INDEX [index_name] (index_column_name, ...)
|
|
42 |
(index_column_name, ...)
|
|
43 |
[CONSTRAINT [symbol] ] UNIQUE [INDEX]
|
|
44 |
(index_column_name, ...)
|
|
45 |
[CONSTRAINT [symbol] ] FOREIGN KEY [index_name] (index_column_name, ...)
|
|
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
46 |
reference_definition
|
1994.4.22
by Marisa Plumb
create table fixes, index toc adjustments |
47 |
CHECK (expr)
|
48 |
||
2194.5.3
by Andrew Hutchings
Markup fixes |
49 |
column_definition
|
50 |
-----------------
|
|
51 |
||
52 |
:: |
|
1994.4.22
by Marisa Plumb
create table fixes, index toc adjustments |
53 |
|
54 |
data_type [NOT NULL | NULL] [DEFAULT default_value] |
|
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
55 |
[AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY] |
56 |
[COMMENT 'string'] |
|
57 |
[reference_definition] |
|
58 |
||
2194.5.3
by Andrew Hutchings
Markup fixes |
59 |
data_type
|
60 |
---------
|
|
1994.4.20
by Marisa Plumb
fixed build warnings |
61 |
|
1994.4.22
by Marisa Plumb
create table fixes, index toc adjustments |
62 |
* INTEGER
|
63 |
* BIGINT
|
|
64 |
* DOUBLE[(length, decimals)]
|
|
65 |
* DECIMAL[(length[,decimals])]
|
|
66 |
* DATE
|
|
67 |
* TIMESTAMP
|
|
68 |
* DATETIME
|
|
69 |
* VARCHAR(length) [COLLATE collation_name]
|
|
70 |
* VARBINARY(length)
|
|
71 |
* BLOB
|
|
72 |
* TEXT [BINARY] [COLLATE collation_name]
|
|
73 |
* ENUM(value1, value2, value3, ...) [COLLATE collation_name]
|
|
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
74 |
|
2194.5.3
by Andrew Hutchings
Markup fixes |
75 |
reference_option
|
76 |
----------------
|
|
77 |
||
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
78 |
RESTRICT | CASCADE | SET NULL | NO ACTION |
79 |
||
2194.5.3
by Andrew Hutchings
Markup fixes |
80 |
engine_options
|
81 |
---------------
|
|
82 |
||
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
83 |
engine_option [[,] engine_option] ... |
84 |
||
2194.5.3
by Andrew Hutchings
Markup fixes |
85 |
engine_option
|
86 |
-------------
|
|
87 |
||
1887.3.1
by Brian Aker
Update to documentation for create table and create schema. |
88 |
ENGINE = engine_name |
89 |
{ engine_specific } |
|
2363.1.2
by Brian Aker
Fix documentation for replication. |
90 |
|
91 |
REPLICATE
|
|
92 |
---------
|
|
93 |
||
94 |
Specify whether or not a TABLE should be replicated. |
|
95 |
||
96 |
REPLICATE=[TRUE|FALSE] |