mysql操作

创建表:create table stuinfo(stuid int unsigned primarykey,stuname varchar(10) not null,gender char(1),birthdate date,class varchar(2),city varchar(20)

插入数据:insert into stuinfo(stuid,stuname,gender,class,city,major) values(20190001,"芦苇","男","3班","合肥","唱歌");

给表新增字段:alter table stuinfo add major varchar(20) after(before)  字段名;

删除字段:alter table stuinfo drop major ;

表重新命名:alter table stuinfo rename stuinfos;

查询结果导出:select * from stuinfo into outfile  '目录'  fields terminated by '分裂符号' lines terminated by '\r\n';

文件导入数据库:load data infile '文件路经' into table orders fields terminated by '\t' lines terminated by '\r\t'; 

 

 

错误:1290 - The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 

处理方式:修改mysql配置文件my.ini中secure-file-priv的值,为空任意文件目录导出,配置目录为指定目录导入导出。

 

转载于:https://www.cnblogs.com/luweilehei/p/11323911.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值