求一段筛选的sql语句

Chronicle 2010-08-05 05:14:44

表一 select classroom from Class where status<="C" 'classroom无重复
表二 select classroom,Type,start,end from Routine where time=date() 'classroom 有重复

查询结果:

要求从表二中筛选出classroom的值存在于表一的记录.
...全文
46 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
shenzhenNBA 2010-08-05
  • 打赏
  • 举报
回复
copy 上来忘了前面,呵呵....大意了
Chronicle 2010-08-05
  • 打赏
  • 举报
回复
谢谢ls

顺便纠正一下[time]前面的where要去掉
shenzhenNBA 2010-08-05
  • 打赏
  • 举报
回复

select [classroom],[Type],[start],[end] from Routine where classroom in (select classroom from class where status <= 'C' ) and where [time]=date()
shenzhenNBA 2010-08-05
  • 打赏
  • 举报
回复

select [classroom],[Type],[start],[end] from Routine where classroom in (select classroom from class where status <= 'C' )

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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