题目内容

语句“SELET COUNT(*) FROM human”返回多少行?

A. 1
B. 2
C. 3
D. 表内实际记录条数

查看答案
更多问题

假设订单表orders用来存储订单信息,cid代表客房编号,money代表订购金额,现要查询每个客房订购次数和订购总金额,下面哪个查询语句可以返回正确结果

A. select cid,count(money),sum(ciD) from orders group by cid
B. select cid,count(money),sum(ciD) from orders order by cid
C. select cid,count(ciD) ,sum(money) from orders order by cid
D. select cid,count(ciD) ,sum(money) from orders group by cid

下列语句中正确的是

A. SELECT * TOP 5 FROM TABLE_NAME
B. SELECT TOP 5% * FROM TABLE_NAME
C. SELECT * TOP 5 PERCENT FROM TABLE_NAME
D. SELECT TOP 5 PERCENT * FROM TABLE_NAME

Sqlserver提供了一些字符串函数,以下说法中错误的是

A. select right (‘hello’ , 3) 返回值为:llo
B. select trim (‘ hello ’) 返回值为:hello (前后无空格)
C. select replace (‘hello’ , ‘e’, ‘o’) 返回值为:hollo
D. select ltrim( rtrim (‘hello’)) 返回值为:hello(前后都无空格)

现有student_info(学生)表,其中包括字段:stu_name(姓名,varchar型),stu_id(学号,int型),stu_grade(成绩,int型)。现在需要查询成绩为80分的学生姓名,并且结果按照学号降序排列。下面查询语句正确的是

A. Select stu_name from student_info where stu_grade=80 order by stu_id
B. Select stu_name from student_info where stu_grade=80 order by stu_id desc
C. Select stu_name from student_info where stu_grade like 80 group by stu_id
D. Select stu_name from student_info where stu_grade like 80 group by stu_id desc

答案查题题库