现象:使用单引号报错,双引号却正常。发生背景:在B站学mysql的时候,要查dept表里的名字带有s的dname字段出来,版本是前几天下载的最新版本。
mysql> Select dname from dept where dname like ‘%s%’;
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 '%s%’' at line 1