id
name
address1
city
state_or_province
zip_or_postcode
may not apply in some parts of the world
country_code
ISO 3166 alpha-2 country code
created_at
NOW()
updated_at
NOW()
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'
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.