这个SQL语句有两个错误:

  1. 缺少通配符 %,在使用 LIKE 运算符时需要用 % 表示通配符。正确的写法是:LIKE '%二%'

  2. 缺少关键字 LIKE,在使用 LIKE 运算符时需要加上关键字 LIKE。正确的写法是:studentName LIKE '%二%'

所以,正确的SQL语句应该是:SELECT * FROM student WHERE 1=1 AND studentName LIKE '%二%';

SQL语句错误分析:`select * from student where 1=1 and like studentName '二'`

原文地址: https://www.cveoy.top/t/topic/qn96 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录