首页 > 数据库技术 > 详细

MySql实用小技巧

时间:2016-12-10 00:28:14      阅读:188      评论:0      收藏:0      [点我收藏+]
  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实用小技巧

原文:http://www.cnblogs.com/panweiwei/p/6152836.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!