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
你是全角的引号,和你写代码这些一样,得用半角符号
你用了中文输入法下的单引号吧,下图依次是中文双引号单引号和英文双引号单引号
n你用navicat 试试呢 ,估计你mysql配置有问题把
补充一下,我是先在word上写好然后粘贴过去的,和这个有关吗?我刚刚试了下,直接在dos窗口里写就没问题。这是word里写好的代码:Select dname from dept where dname like ‘%s%’