SQL Table Creator

This is a SQL table creator for Postgres, MySQL, SQL Server, SQLite, and Redshift databases from the makers of Beekeeper Studio. Create a SQL table below using the point and click UI, then copy the output SQL into your database.
edit

Columns

add
 
Name
Type
Nullable
Default Value
Comment
Primary
 
id
autoincrement
(NULL)
(NULL)
clear
name
varchar(255)
(NULL)
(NULL)
clear
address1
varchar(255)
(NULL)
(NULL)
clear
city
varchar(255)
(NULL)
(NULL)
clear
state_or_province
varchar(255)
(NULL)
(NULL)
clear
zip_or_postcode
varchar(255)
(NULL)
may not apply in some parts of the world
clear
country_code
char(2)
(NULL)
ISO 3166 alpha-2 country code
clear
created_at
timestamp
NOW()
(NULL)
clear
updated_at
timestamp
NOW()
(NULL)
clear

CREATE TABLE Generated SQL (Postgres)

create table "companies" (
  "id" serial primary key,
  "name" varchar(255) not null,
  "address1" varchar(255) not null,
  "city" varchar(255) not null,
  "state_or_province" varchar(255) not null,
  "zip_or_postcode" varchar(255) null,
  "country_code" char(2) not null,
  "created_at" timestamp not null default NOW(),
  "updated_at" timestamp not null default NOW()
);
comment on column "companies"."zip_or_postcode" is 'may not apply in some parts of the world';
comment on column "companies"."country_code" is 'ISO 3166 alpha-2 country code'

Make SQL Fun Again With Beekeeper Studio

This SQL table creator is just one of several useful features built into Beekeeper Studio, the SQL editor and database GUI that makes writing SQL fun again. Available for Linux, MacOS, and Windows.

Beekeeper Studio example

Get Started Free