SQL语句建立表时为属性定义主关键字应在SQL语句中使用短语()。
A. FOREIGN KEY
B. PRIMARY KEY
C. UNIQUE
D. CHECK
查看答案
在SQLSELECT语句中为了将查询结果存储到临时表应该使用短语是()。
A. TO CURSOR
B. INTO CURSOR
C. INTO DBF
D. TO DBF
嵌套查询命令中的IN相当于()。
A. =
B. +
C. -
D. 集合运算符∈
检索选修的至少一门课程的成绩高于或等于85分的学生的学号、姓名和性别,正确的SQL命令是()。
A. SELECT xh,xm,xb FROM xsxx WHERE EXIST ; (SELECT* FROM xscj WHERE xsxx.xh=xscj.xh AND cj<=85)
B. SELECT xh,xm,xb FROM xsxx WHERE NOT EXIST ; (SELECT* FROM xscj WHERE xsxx.xh=xscj.xh AND cj<=85)
C. SELECT xh,xm,xb FROM xsxx WHERE EXIST ; (SELECT* FROM xscj WHERE xsxx.xh=xscj.xh AND cj>=85)
D. SELECT xh,xm,xb FROM xsxx WHERE NOT EXIST ; (SELECT* FROM xscj WHERE xsxx.xh=xscj.xh AND cj<85) AND
假定学号的第11、12位为班级代码,要计算各班学生选修课程号为“410001”课程的平均成绩,正确的SQL命令是()。
A. SELECT SUBSTR(xh,11,2) AS 班级,AVG(cj) AS 平均分 FROM xscj; WHERE kch="410001" GROUP BY 1
B. SELECT 班级 AS SUBSTR(xh,11,2), 平均分 AS AVG(cj) FROM xscj; WHERE kch="410001" GROUP BY班级
C. SELECT SUBSTR(xh,11,2) AS 班级,AVG(cj) AS 平均分 FROM xscj; WHERE kch="410001" ORDER BY 1
D. SELECT 班级 AS SUBSTR(xh,11,2), 平均分 AS AVG(cj) FROM xscj; WHERE kch="410001" ORDER BY班级