CreateTable demo

← List all

← Parse another

Parsing "CREATE TABLE cats ( id INTE..."

Input

Original

CREATE TABLE cats ( id INTEGER AUTO_INCREMENT, nickname CHARACTER VARYING(255), birthday DATE, license_id INTEGER, price NUMERIC(5,2), PRIMARY KEY ("id") )

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: 5

name data_type allow_null default primary_key unique autoincrement charset collate
id INTEGER false true true true
nickname CHARACTER VARYING(255) true false false false
birthday DATE true false false false
license_id INTEGER true false false false
price NUMERIC(5,2) true false false false

Cross-platform SQL

MySQL
CREATE TABLE cats ( `id` INTEGER PRIMARY KEY AUTO_INCREMENT, nickname CHARACTER VARYING(255), birthday DATE, license_id INTEGER, price NUMERIC(5,2) )
PostgreSQL
CREATE TABLE cats ( "id" SERIAL PRIMARY KEY, nickname CHARACTER VARYING(255), birthday DATE, license_id INTEGER, price NUMERIC(5,2) )
Sqlite3
CREATE TABLE cats ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, nickname CHARACTER VARYING(255), birthday DATE, license_id INTEGER, price NUMERIC(5,2) )

Errata

comments powered by Disqus

© 2017 Brighter Planet, Inc.