易截截图软件、单文件、免安装、纯绿色、仅160KB

mysql文档学习3.6

远程登录 -h IP地址
ctrl + d 退出 或 \q 或 quit
select version(); 当前版本
current_date当前日期 或curdate() 或 current_date()
SELECT name, birth, curdate(),(year(curdate())-year(birth)) - (right(curdate(),5)<right(birth,5)) as age from 表 ORDER BY name;
year 提取年部分 right(curdate(),5)提取右面的5位
month()月 month(curdate())
day() 天 或dayofmonth 意思是拿月来说的天数
dayofyear() 拿年来说的天
select date_add(curdate(),interval 1 year);
interval(间隔的意思) date_add 时间相加的函数
interval 数字 year或者month
mod(month(curdate()),12)
mod的意思也没用怎么明白! 意思就是前一个值是5,后面指定前面的参数最大是多少
now() 当前时间
user() 当前用户及链接地址
\c 重新开始
select distinct name from test;
distinct 去掉重复字段
order by 排序
binary(二进制意思) 强制区分大小写


相关文档:

mysql alter 语句用法,添加、修改、删除字段等

http://www.blogjava.net/Alpha/archive/2007/07/23/131912.html
//主键549830479
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//增加一个新列549830479
alter table t2 add d timestamp;
alter table infos add ex tinyint n ......

MYSQL[命令行下]导入导出大数据方法!


2007-11-16 15:37
今天看着手册试了下,发现原来大数据导入导出是那么的轻松(不是很大,200多M的文本而以)
注意:如果发现MYSQL unknown command '\'这样的提示,则设置一下服务器的字符集,如:
mysql -uroot -ppasspass --default-character-set=utf8 databaseName <d:bakcup.sql
这样就不会报错了,^_^
导出 ......

MySQL性能优化

作者:andyao
原文link: http://andyao.javaeye.com/admin/show/144033
转载请留名
1. 简介
在Web应用程序体系架构中,数据持久层(通常是一个关系数据库)是关键的核心部分,它对系统的性能有非常重要的影响。MySQL是目前使用最多的开源数据库,但是MySQL数据库的默认设置性能非常的差,仅仅是一个玩具数据库。因此在 ......

MySQL error 2003的解决过程

MySQL error 2003的解决过程刚才论坛出现:
error 2003:Can't connect to MySQL server on ..............
 问题:MYSQL数据库没有启动~
 解决:百度了一下,说的解决方法各种各样,很多.
 1\在“运行”里找到C:\mysql\bin\mysqld-opt.exe 运行就是了!找了,没有这个东西:(
2 在Dos下 cd \mysql ......

MySQL EVENT


MySQL EVENT 
来源:http://samyu.blog.51cto.com/344284/146011
event_scheduler:
The MySQL event scheduler is a thread that runs in the background looking for events to execute. It spends a lot of time sleeping -- and won't do anything unless the new global variable "event_scheduler" is set t ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号