0
Follow
0
View

To retrieve the names of students not enrolled in C06 and their classes

dengwenlon 注册会员
2023-02-28 00:31

This answer quotes ChatGPT

Your query statement is incorrect. The correct SQL query statement is

.
SELECT student.sname, student.class
FROM student
WHERE student.sno NOT IN (
    SELECT elective.sno
    FROM elective
    WHERE elective.cno = 'C06'
);

This query uses a subquery to find the number of a student taking course C06 on elective relational table Elective table, and then finds a student name and class that does not appear in this subquery result in Student relational table Student.

About the Author

Question Info

Publish Time
2023-02-28 00:31
Update Time
2023-02-28 00:31

Related Question

用CentOS senemail发送邮件无效

Tomcat的Maven插件启动Tomcat,控制台没有输出信息

Tomcat启动出现问题

在StencilJS中,当输入autocus和模糊时,在cypress中面临问题

magento能开发app接口吗?

更新完毕后VMware tools故障

引导5 data-bs-toggle“崩溃”防止动作与点击按钮与div

为什么作曲家不能设置CodeSniffer在一个克隆的Magento2项目?

在StoreConnector中构建时

在部署promethes -ms团队时,我提交了一个bug unmarshal