DB类host=$host; $this->user=$user; $this->pass=$pass; $this->data=$data; $this->conn=$conn; $this->code=$code; $this->connect(); } public function __get($name){return $this->$name;} public function __set($name,$value){$this->$
《MySQL常用命令1 / 29 MySQL 常用命令汇总 http://www.database8.com 2011-3-1 2 / 29 Mysql 常用命令 show databases; 显示数据库 create database name; 创建数据库 use databasename; 选择数据库 drop database name 直接删除数据库,不提醒 show tables; 显示表 describe tablename; 显示具体的表结构 select 中加上 disti
经常用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 到底有什么不一样,他们之间的区别是什么以及各自的效率问题。
首先,