Skip to content

Instantly share code, notes, and snippets.

@ivanliu
Created December 3, 2017 22:34
Show Gist options
  • Save ivanliu/e5efbcfd36a8bd575440b06dce0e23b1 to your computer and use it in GitHub Desktop.
Save ivanliu/e5efbcfd36a8bd575440b06dce0e23b1 to your computer and use it in GitHub Desktop.
CREATE TABLE `company` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`industry` varchar(50) NOT NULL,
`ceo` varchar(50) DEFAULT NULL,
`founders` varchar(150) DEFAULT NULL,
`founded` varchar(50) DEFAULT NULL,
`headquarters` varchar(150) DEFAULT NULL,
`country` varchar(50) DEFAULT NULL,
`num_of_employees` int(10) DEFAULT NULL,
`symbol_id` int(10) NOT NULL,
`stock_price` decimal(10,5) NOT NULL,
`market_cap` decimal(15,2) NOT NULL,
`created_on` datetime NOT NULL,
`modified_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
KEY `fk_symbol_idx` (`symbol_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment