MySql实用小技巧

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySql实用小技巧相关的知识,希望对你有一定的参考价值。

  1. 1:将txt中的数据导入数据库表中,命令:
  2. load data local infile ‘D:\\文件名.txt‘ into table 表名 fields terminated by ‘\t‘;
 
2:插入数据后查询显示乱码,解决方案: set character set_results=utf-8;
 
3:多表多外键数据查询
select * from userinfo,usertype,usercert where userinfo.certid=usercert.certid and userinfo.typeid=usertype.typeid limit ?,?;
 
select * from userinfo,usertype,usercert where userinfo.certid=usercert.certid and userinfo.typeid=usertype.typeid and userinfo.userid=140950223 and password=55555 limit ?,?;

以上是关于MySql实用小技巧的主要内容,如果未能解决你的问题,请参考以下文章

从零基础学MySQL第二讲(最精简实用的小技巧)

实用电脑便签技巧 让你变便签应用小达人

[原创][FPGA]Quartus实用小技巧(长期更新)

不走弯路的实用python小技巧

Exchange 2010 实用小技巧

25个实用编程小技巧