CreateTable demo

← List all

← Parse another

Parsing "create table __TABLE_NAME__..."

Input

Original

create table __TABLE_NAME__ (item_id smallint UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, item_fp_type ENUM(\'classic\',\'romantic\',\'high fashion\'), item_category_id tinyint unsigned NOT NULL, item_rareness_id tinyint unsigned NOT NULL, item_name varchar(32) NOT NULL, item_asset_id smallint unsigned NOT NULL, item_data TEXT NOT NUll) ENGINE=InnoDB DEFAULT CHARSET=utf8

Results

  1. Table structure
  2. Cross-platform SQL
  3. Errata

CreateTable is still young—please comment on any errors or surprises in the Errata section! Thank you.

Table structure

Number of columns: 7

name data_type allow_null default primary_key unique autoincrement charset collate
item_id SMALLINT UNSIGNED false true true true
item_fp_type ENUM(\'CLASSIC\',\'ROMANTIC\',\'HIGH FASHION\') true false false false
item_category_id TINYINT UNSIGNED false false false false
item_rareness_id TINYINT UNSIGNED false false false false
item_name CHARACTER VARYING(32) false false false false
item_asset_id SMALLINT UNSIGNED false false false false
item_data TEXT false false false false

Cross-platform SQL

MySQL
CREATE TABLE __TABLE_NAME__ ( item_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, item_fp_type ENUM(\'CLASSIC\',\'ROMANTIC\',\'HIGH FASHION\'), item_category_id TINYINT UNSIGNED, item_rareness_id TINYINT UNSIGNED, item_name CHARACTER VARYING(32), item_asset_id SMALLINT UNSIGNED, item_data TEXT )
PostgreSQL
CREATE TABLE __TABLE_NAME__ ( item_id SMALLINT UNSIGNED PRIMARY KEY, item_fp_type ENUM(\'CLASSIC\',\'ROMANTIC\',\'HIGH FASHION\'), item_category_id TINYINT UNSIGNED, item_rareness_id TINYINT UNSIGNED, item_name CHARACTER VARYING(32), item_asset_id SMALLINT UNSIGNED, item_data TEXT )
Sqlite3
CREATE TABLE __TABLE_NAME__ ( item_id SMALLINT UNSIGNED PRIMARY KEY AUTOINCREMENT, item_fp_type ENUM(\'CLASSIC\',\'ROMANTIC\',\'HIGH FASHION\'), item_category_id TINYINT UNSIGNED, item_rareness_id TINYINT UNSIGNED, item_name CHARACTER VARYING(32), item_asset_id SMALLINT UNSIGNED, item_data TEXT )

Errata

comments powered by Disqus

© 2017 Brighter Planet, Inc.