CREATE TABLE

Description

Create a new table.

Syntax

  1. > CREATE TABLE [IF NOT EXISTS] [db.]table_name
  2. (
  3. name1 type1,
  4. name2 type2,
  5. ...
  6. )

create_table_statement:

Create Table Diagram

Examples

  1. > CREATE TABLE test(a int, b varchar(10));
  2. > INSERT INTO test values(123, 'abc');
  3. > SELECT * FROM test;
  4. +------+---------+
  5. | a | b |
  6. +------+---------+
  7. | 123 | abc |
  8. +------+---------+