贾天乐
2021011206
按照逻辑随机生成测试数据并进行查询
SELECT sname 姓名, 2020-sage 出生年份,sdept 所在系
FROM student2021011206;
SELECT DISTINCT sno
FROM sc2021011206;
SELECT sno ,sname
FROM student2021011206
WHERE sdept='计算机' and sage<20;
SELECT sno ,sname,sdept,sage
FROM student2021011206
WHERE sage not BETWEEN 20 AND 23 and ssex='女';
SELECT sno,sname,ssex
FROM student2021011206
WHERE sdept in('数学','计算机');
SELECT sno,sname
FROM student2021011206
WHERE sname like '张%' or sname like '刘%';
SELECT sno 学号,grade*0.75 成绩
FROM sc2021011206
WHERE grade BETWEEN 80 AND 90;
SELECT cno
FROM course2021011206
WHERE cpno is null and ccredit>1;
SELECT sno,grade
FROM sc2021011206
Where cno=1001
ORDER BY grade DESC,sno ASC
![](https://i-blog.csdnimg.cn/blog_migrate/b8e22104e611d6aa24832effbdc866d4.png)
![](https://i-blog.csdnimg.cn/blog_migrate/4e375ce59d3930440e20333b2316a383.png)
![](https://i-blog.csdnimg.cn/blog_migrate/38ec63659954123da05973bcf2bcdfa1.png)
![](https://i-blog.csdnimg.cn/blog_migrate/459535dbbe3d3c248440f510983e1629.png)
![](https://i-blog.csdnimg.cn/blog_migrate/09e5bec21d3f89ff187818260f5edb06.png)
![](https://i-blog.csdnimg.cn/blog_migrate/fa54273910900bd43704d03495ceb5ac.png)
![](https://i-blog.csdnimg.cn/blog_migrate/6ff47825ad54248f863b254655eeb532.png)
![](https://i-blog.csdnimg.cn/blog_migrate/09a9c63c85e0034e6c8182d13a59a313.png)
![](https://i-blog.csdnimg.cn/blog_migrate/137cd1193a17732f06a3153eb9793afa.png)
![](https://i-blog.csdnimg.cn/blog_migrate/1924ebef9c0857cb7d33a60a37cc3a7d.png)
![](https://i-blog.csdnimg.cn/blog_migrate/e8f07d9de06694fae71361d80c098749.png)