Skip to content

Instantly share code, notes, and snippets.

@alexleventer
Created December 28, 2015 05:26
Show Gist options
  • Save alexleventer/9a567101dc80197f8b57 to your computer and use it in GitHub Desktop.
Save alexleventer/9a567101dc80197f8b57 to your computer and use it in GitHub Desktop.
CREATE TABLE companies
(
_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
company VARCHAR(100) NOT NULL,
domain VARCHAR(100) NOT NULL,
city VARCHAR(100),
state VARCHAR(100),
country VARCHAR(100),
industry VARCHAR(100),
PRIMARY KEY(_id),
UNIQUE KEY domain_email_key (company, domain),
INDEX domain_ind (domain),
FOREIGN KEY (domain)
REFERENCES domainEmails(domain)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment