MYSQL中同一句SQL语句为什么第一次执行失败,第二次执行才成功? 20
->select*fromuserwhereusername='bbb'andpassword='222';1064-YouhaveanerrorinyourSQLsyn...
-> select * from user where username='bbb' and password='222';
1064 - 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 'select * from user where username='bbb' and password='222'' at line 3
mysql> select * from user where username='bbb' and password='222';
+----+----------+----------+--------+
| id | username | password | name |
+----+----------+----------+--------+
| 2 | bbb | 222 | zhouyu |
+----+----------+----------+--------+
1 row in set 展开
1064 - 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 'select * from user where username='bbb' and password='222'' at line 3
mysql> select * from user where username='bbb' and password='222';
+----+----------+----------+--------+
| id | username | password | name |
+----+----------+----------+--------+
| 2 | bbb | 222 | zhouyu |
+----+----------+----------+--------+
1 row in set 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询