MySQL入门:初探

为了参加腾讯算法大赛,自己建了数据库。

以下是新建表和上载数据的代码。 

create table user_data(
id int not null auto_increment,  
age int(1),
gender int(1),
area int,
status int,
education char,
consuptionAbility int,
device int,
work int,
connectionType int,
behavior int,
primary key(id)
);

load data local infile "C:\\Users\\xq\\Documents\\腾讯广告算法大赛\\datasets\\user.dat"
into table user_data
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n';

SHOW VARIABLES LIKE '%local%';
SET GLOBAL local_infile=1

猜你喜欢

转载自blog.csdn.net/qq_26271435/article/details/89672433