CreateTable demo

← List all

← Parse another

Parsing "CREATE TABLE \"action_links\"..."

Input

Original

CREATE TABLE "action_links" (
	serial integer PRIMARY KEY,
	title text,
	"picture_url" text,
	"picture_url_android" text,
	"action_type" text,
	"action_value" text,
	"action_sections_ref" INTEGER DEFAULT 0 REFERENCES action_sections (serial),
	"sort_order" INTEGER,
	"parent_ref" INTEGER NOT NULL DEFAULT 0 REFERENCES action_links (serial),
	"navigation_page_ref" integer NOT NULL DEFAULT 0 REFERENCES navigation (serial)
);
CREATE TABLE "action_sections" (
	"serial" integer PRIMARY KEY,
	"name" text,
	"sort_order" INTEGER
);

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

name data_type allow_null default primary_key unique autoincrement charset collate
serial INTEGER false true true false
title TEXT true false false false
picture_url TEXT true false false false
picture_url_android TEXT true false false false
action_type TEXT true false false false
action_value TEXT true false false false
action_sections_ref INTEGER true 0 REFERENCES action_sections (serial) false false false
sort_order INTEGER true false false false
parent_ref INTEGER false 0 REFERENCES action_links (serial) false false false
navigation_page_ref INTEGER false 0 REFERENCES navigation (serial) false false false

Cross-platform SQL

MySQL
CREATE TABLE action_links ( serial INTEGER PRIMARY KEY, title TEXT, picture_url TEXT, picture_url_android TEXT, action_type TEXT, action_value TEXT, action_sections_ref INTEGER, sort_order INTEGER, parent_ref INTEGER, navigation_page_ref INTEGER )
PostgreSQL
CREATE TABLE action_links ( serial INTEGER PRIMARY KEY, title TEXT, picture_url TEXT, picture_url_android TEXT, action_type TEXT, action_value TEXT, action_sections_ref INTEGER, sort_order INTEGER, parent_ref INTEGER, navigation_page_ref INTEGER )
Sqlite3
CREATE TABLE action_links ( serial INTEGER PRIMARY KEY, title TEXT, picture_url TEXT, picture_url_android TEXT, action_type TEXT, action_value TEXT, action_sections_ref INTEGER, sort_order INTEGER, parent_ref INTEGER, navigation_page_ref INTEGER )

Errata

comments powered by Disqus

© 2017 Brighter Planet, Inc.