- 论坛徽章:
- 0
|
我用的mysql 5.1
colom1 tinyint(5);
colom2 smallint(1);
insert into table (colom1,colom1) values (1,0) where not exists (select * from table a where a.colom1 =1);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where not exists (select * from table a where a.colom1 =1);'
为什么错误?
但是select * from table where not exists (select * from table a where a.colom1 =1);
正确的
Empty set (0.00 sec);
为什么呀? |
|