1.第一個Table建置用的SQL Command
CREATE TABLE `stocks` (
`StocksDate` date DEFAULT NULL,
`StocksNo` varchar(100) DEFAULT NULL,
`StocksTime`time DEFAULT NULL,
`Price` float DEFAULT null,
`Buy` float DEFAULT NULL,
`Sell` float DEFAULT NULL,
`Fluctuation` varchar(100) DEFAULT NULL,
`StocksNumber` float DEFAULT NULL,
`ClosePrice` float DEFAULT NULL,
`OpenPrice` float DEFAULT NULL,
`High` float DEFAULT NULL,
`Low` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2.建置好Table 後輸入
INSERT INTO stocks
(StocksDate, StocksNo, StocksTime, Price, Buy, Sell, Fluctuation, StocksNumber, ClosePrice, OpenPrice, High, Low)
VALUES('2018-10-19','2330','14:30','236.0','235.5', '236.0', '▽0.5','28,334','236.5', '231.0', '236.5','230.0');
INSERT INTO stocks
(StocksDate, StocksNo, StocksTime, Price, Buy, Sell, Fluctuation, StocksNumber, ClosePrice, OpenPrice, High, Low)
VALUES('2018-10-19','2330','14:30','236.0','235.5', '236.0', '▽0.5','28334','236.5', '231.0', '236.5','230.0');