sql统计三位学生缺考的课程

dengdaigeguo 2013-05-19 06:58:22




统计三位学生缺考的课程, 结果表如下: STD_ID ,DTD_NAME ,SUB_ID ,SUB_TITLE
...全文
326 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
dengdaigeguo 2013-05-19
  • 打赏
  • 举报
回复
你的是对的..非常感谢 s.DTD_NAME为s.STD_NAME 话说版主的头像很霸气,吓屎我了..
ACMAIN_CHM 2013-05-19
  • 打赏
  • 举报
回复
select s.STD_ID ,s.DTD_NAME ,t.SUB_ID ,t.SUB_TITLE from student s,subject t where not exists (select 1 from score where STD_ID=s.STD_ID and SUB_ID=t.SUB_ID) 假设第一个表名为 student 楼主只需要执行,不要问S是什么,T是什么。 解释起来两个字“别名”, 但估计这样解释无法让你明白。 如果语句有什么不对或报错,则把你的语句和错误信息一同贴出。
dengdaigeguo 2013-05-19
  • 打赏
  • 举报
回复
我运行不了啊..三个表示student ,subject ,score .您写的T ,A,B,C是啥意思?
rucypli 2013-05-19
  • 打赏
  • 举报
回复
select T.std_name,T.sub_title from (select A.std_id,A.std_name,B.sub_id,B.sub_title from tb1 A,tb2 B)T left join tb3 C on T.std_id=C.std_id and T.sub_id=C.sub_id where C.score is null

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧