DELETE
FROM student
WHERE Sname='张立';
运行结果:
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 'DELETE
FROM student
WHERE Sname='张立'' at line 4
DELETE
FROM student
WHERE Sname='张立';
运行结果:
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 'DELETE
FROM student
WHERE Sname='张立'' at line 4
检查一下字段名和数据库名有没有写错的地方,还有就是这个student表是否和其他表建立起了关联,就比说你这个名字叫张立的id在其他表里面也有,你只能先删除外键里面对应的信息才能删除这一条数据