CREATE DATABASE `bin`;
CREATE TABLE `binbase` (
`BIN` varchar(6) DEFAULT NULL,
`BRAND` varchar(45) DEFAULT NULL,
`BANK` varchar(45) DEFAULT NULL,
`CARD_TYPE` varchar(45) DEFAULT NULL,
`CARD_CATEGORY` varchar(45) DEFAULT NULL,
`COUNTRY` varchar(45) DEFAULT NULL,
`CC_ISO3166_1` varchar(45) DEFAULT NULL,
`CC_ISO_A3` varchar(45) DEFAULT NULL,
`COUNTRY_NUM` varchar(45) DEFAULT NULL,
`WEBSITE` varchar(45) DEFAULT NULL,
`PHONE` varchar(45) DEFAULT NULL,
KEY `bin_idx` (`BIN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
USE bin;
LOAD DATA LOCAL INFILE 'binbase_sample.csv' INTO TABLE binbase FIELDS TERMINATED BY ';' ENCLOSED BY '"' LINES TERMINATED BY '\n' (BIN,BRAND,BANK,CARD_TYPE,CARD_CATEGORY,COUNTRY,CC_ISO3166_1,CC_ISO_A3,COUNTRY_NUM,WEBSITE,PHONE);
|