摘要:地址:http://www.zixue.it/thread-7836-1-1.html相信很多用了mysql很久的人,对这两个字段属性的概念还不是很清楚,一般会有以下疑问:1、我字段类型是not null,为什么我可以插入空值2、为毛not null的效率比null高3、判断字段不为空的时候,到底要select * from table where column '' 还是要用 select * from table where column is not null 呢。带着上面几个疑问,我们来深入研究一下null 和 not null 到底有什么不一样。首先,我们要搞清楚“空
阅读全文
摘要:1.查看用户select user();2.更改账户密码use mysql;update user set password = password('pwd') where user = 'root' and host='localhost';3.查看所有数据库show databases;4.查看某个数据库的所有数据表show tables from db_test;5.查看某个数据表的结构use db_test;desc tb_test;6.创建数据库create db_test character set utf8;7.创建数据表use d
阅读全文