【单选题】
使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是?
①
UPDATE SET AGE WITH AGE+1
③
UPDATE STUDENT SET AGE=AGE+1
④
UPDATE STUDENT AGE WITH AGE+1
【单选题】
删除计算机系学生(在student表中)的修课记录(在SC表中)的语句,正确的是( )。
①
DELETE FROM SC JOIN Student b ON S.Sno = b.Sno WHERE Sdept = 计算机系
②
DELETE FROM SC FROM SC JOIN Student b ON SC.Sno = b.Sno WHERE Sdept = 计算机系
③
DELETE FROM Student WHERE Sdept = 计算机系
④
DELETE FROM SC WHERE Sdept = 计算机系
【单选题】
设有学生表(学号,姓名,所在系)。下列建立统计每个系的学生人数的视图语句中,正确的是( )。
①
CREATE VIEW v1AS
SELECT 所在系, COUNT(*) FROM 学生表 GROUP BY 所在系
②
CREATE VIEW v1AS
SELECT 所在系, SUM(*) FROM 学生表 GROUP BY 所在系
③
CREATE VIEW v1(系名,人数) AS
SELECT 所在系, SUM(*) FROM 学生表 GROUP BY 所在系
④
CREATE VIEW v1(系名,人数) AS
SELECT 所在系, COUNT(*) FROM 学生表 GROUP BY 所在系
【单选题】
下列删除计算机系学生(在student表中)的修课记录(在SC表中)的语句,正确的是( )。
①
DELETEFROM SC JOIN Student b ON S.Sno = b.Sno
WHERE Sdept = 计算机系
②
DELETE FROM SC FROM SC JOIN Student b ON SC.Sno = b.Sno
WHERE Sdept = 计算机系
③
DELETE FROM StudentWHERE Sdept = 计算机系
④
DELETE FROM SC WHERE Sdept = 计算机系
【单选题】
对由 SELECT—FROM—WHERE—GROUP—ORDER 组成的 SQL 语句,其在被 DBMS 处理时,各子句的执序次序为( )。
①
A.SELECT—FROM—GROUP—WHERE—ORDER
②
B.FROM—SELECT—WHERE—GROUP—ORDER
③
C.FROM—WHERE—GROUP—SELECT—ORDER
④
D.SELECT—FROM—WHERE—GROUP—ORDER