Companies template

A table for storing company data in a website, app, or ERP
Open in Table Builder

Columns

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

Generated SQL

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'