HELP~~,数据库问题~

HELP~~,数据库问题~,第1张

首先,注意字符的大小写匹配。表名、列名前后要一致。

2、select count() from Student

where ClassId in

(select ClassId from TC where TeacherId in

(select TeacherId from Degree where TeacherId = '3' and Degree < 85 group by TeacherId) and ClassId = '2' )

3、select from Degree where TeacherId = '2' and Degree >85

后面的65没看懂啥意思

5、select top 1 TeacherId as 教师号, sum(Degree) / count() as 合格率 from Degree group by TeacherId order by 合格率 desc

4、意思没太明白

select top 5 from 表名 A

inner join (select disticnt originallD,degree from 表名 order by rate) B

on AoriginallD = BoriginallD and Adegree = Bdegree

int id = xxx;

string sql = "select name from xxx where id = "+id;

SqlConnection conn = DBHelpergetConn(); //获取数据库链接

SqlCommand cmd = new SqlCommand(sql,conn);

string name = cmdExecuteScalar();

thisLab_idtext = name;

--因为你题目中没有说清楚列代表的含义,我这里假设sno表示选修编号,cno代表学号

select asno,acno,adegree from score a where adegree > ( select bdegree from score b where bsno='3-245' and acno=bcno

)  and asno='3-105'

以上就是关于HELP~~,数据库问题~全部的内容,包括:HELP~~,数据库问题~、sql查询语句,字段有(ID,originalID,degree,rate),我想实现originalID和degree字段不能重复、数据库查询的问题 感谢回答,不胜感激等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/10135777.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-05
下一篇 2023-05-05

发表评论

登录后才能评论

评论列表(0条)

保存