用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字
云代码 - sql代码库

投影 查询

2021-11-05 作者: GuanTou举报

[sql]代码库

SELECT T.TNo,TN,CNo
FROM T,TC
WHERE (T.TNo = TC.TNo)AND (TN='刘伟')
 
SELECT T.TNo,TN,CNo
FROM T,TC
WHERE(TN='刘伟')
 
SELECT S.SNo,SN,CN,Score
FROM S,C,SC
WHERE (S.SNo = SC.SNo)AND (SC.CNo=C.CNo)
 
SELECT S.SNo,SN,CN,Score
FROM S,C,SC
 
SELECT C.CNo,CN,COUNT(SC.SNo) as 选课人数
FROM C,SC
WHERE  (SC.CNo=C.CNo)
GROUP BY C.CNo,CN
 
SELECT C.CNo,COUNT(SC.SNo) as 选课人数
FROM C,SC
WHERE  (SC.CNo=C.CNo)
GROUP BY C.CNo
 
SELECT *
FROM S CROSS JOIN C
 
SELECT X.TN,X.Sal AS SaL_a,Y.Sal AS Sal_b
FROM T AS X ,T AS Y
WHERE  X.Sal>Y.Sal AND Y.TN='刘伟'

SELECT SN,Age,CN
FROM S,C,SC
WHERE S.SNo = SC.SNo AND SC.CNo = C.CNo 


网友评论    (发表评论)


发表评论:

评论须知:

  • 1、评论每次加2分,每天上限为30;
  • 2、请文明用语,共同创建干净的技术交流环境;
  • 3、若被发现提交非法信息,评论将会被删除,并且给予扣分处理,严重者给予封号处理;
  • 4、请勿发布广告信息或其他无关评论,否则将会删除评论并扣分,严重者给予封号处理。


扫码下载

加载中,请稍后...

输入口令后可复制整站源码

加载中,请稍后...