`

mysql基本

阅读更多
太久没用mysql了,差点连登录也不会。。。
http://dev.mysql.com/doc/refman/5.1/zh/preface.html
http://wenku.baidu.com/view/bb409cc75fbfc77da269b1aa.html

\h            mysql命令行的帮助
登录          mysql -u root -p
切换数据库    use dbName
切换用户      connect user/pwd
查看表结构    describe tblName
当前数据库    select DataBase();
我是谁        select User();
列数据库      show DataBases;
列表名        show tables;
字段自增      AUTO_INCREMENT


use mysql;
update user set password=password('pwd') where user='root';


建表http://www.blogjava.net/coderdream/archive/2007/08/17/137642.html

外键http://www.cppblog.com/wolf/articles/69089.html

AUTO_INCREMENThttp://www.bigheaddba.net/article/y2010/559_%E7%AE%80%E5%8D%95%E5%AF%B9%E6%AF%94mysql%E7%9A%84auto_increment%E5%92%8Coracle%E7%9A%84sequence.html

日期http://fanqiang.chinaunix.net/a2/b1/20010705/150000802.html
http://dev.mysql.com/doc/refman/5.1/zh/column-types.html#date-and-time-types
日期使用bigint来记录
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics