CREATE TABLE IF NOT EXISTS Subscribers (
SubscriberId int NOT NULL primary key,
RatePlan varchar(6) NOT NULL,
MonthlyFee float NOT NULL,
Market varchar(10) NOT NULL,
Channel varchar(6) NOT NULL,
StartDate date default NULL,
StopDate date default NULL,
StopType char(1),
Tenure int default NULL,
IsActive int default NULL
);
LOAD DATA INFILE "C:UsersHUGANGGGANGDesktopWileyCompaniondataSubscribers.txt" IGNORE INTO TABLE Subscribers IGNORE 1 ROWS;
保存在XXX.sql文件中,在mysql命令行中使用source XXX.sql执行。