赞
踩
反例子:
select * from employee;
正例子:
select id,name from employee;
理由:
假设现在有employee员工表,要找出一个名字叫jay的人.
- CREATE TABLE `employee` (
- `id` int(11) NOT NULL,
- `name` varchar(255) DEFAULT NULL,
- `age` int(11) DEFAULT NULL,
- `date` datetime DEFAULT NULL,
- `sex` int(1) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
反例:
select id,name from employee where name='jay'
正例
select id,name from employee where name='jay' limit 1;
理由:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。