![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库
方头狮小姐
我不要岁月静好
展开
-
数据库聚集函数
聚集函数:SELECT COUNT(*)FROM SCWHERE Cno=’CS302’;SELECT MIN(Grade),AVG(Grade),MAX(Grade)FROM SCWHERE Cno=’CS302’;SELECT Sno,AVG(Grade)FROM SCGROUP BY Sno;SELECT Sno,AVG(Grade)转载 2014-09-08 21:04:52 · 686 阅读 · 0 评论 -
数据库建表
jiANBCREATE TABLE STAB(SNO CHAR(7) PRIMARY KEY,SNAME CHAR(10) NOT NULL,SSX CHAR(20),SWT SMALLINT);CREATE TABLE Departments(DNO CHAR(4) PRIMARY KEY,DNAME CHAR(10),DHEADNO CH转载 2014-09-08 20:48:17 · 522 阅读 · 0 评论 -
数据库数据更新
聚集函数:SELECT COUNT(*)FROM SCWHERE Cno=’CS302’;SELECT MIN(Grade),AVG(Grade),MAX(Grade)FROM SCWHERE Cno=’CS302’;SELECT Sno,AVG(Grade)FROM SCGROUP BY Sno;SELECT Sno,AVG(Grade)转载 2014-09-08 20:55:53 · 318 阅读 · 0 评论 -
数据库分组查询
SELECT Cname ,GradeFROM SC,CoursesWHERE SC.Cno=Courses.Cno AND Sno=’2011247’;SELECT Students.Sno,GradeFROM SC,StudentsWHERE Students.Sno=SC.Sno AND Cno=’CS202’AND Grade>90;SELECT Stud转载 2014-09-08 21:08:58 · 425 阅读 · 0 评论