delete from sc from sc join student on sc.sno=student.sno from sc join course on sc.cno=course.cno where student.sdept ='计算机系'and grade <60 and cnamne='java'对不对
时间: 2023-11-27 21:50:21 浏览: 109
sql语句练习题及答案
这个 SQL 语句有语法错误,正确的语句应该是:
```sql
DELETE sc FROM sc
JOIN student ON sc.sno = student.sno
JOIN course ON sc.cno = course.cno
WHERE student.sdept = '计算机系' AND sc.grade < 60 AND course.cname = 'java';
```
这条 SQL 语句的作用是删除选修了“java”课程且所在学生所在院系为“计算机系”且该门课程的成绩低于60分的记录。
阅读全文