题目内容

下列说法正确的是()

A. 执行”SELECT *FROM table_name WHERE…”语句后,定会返回所有行的数据
B. WHERE子句在SELECT 子句中为必选
C. 在SQL Server中,”!=”与”<>”作用完全相同
D. 语句”SELECT *FROM table_name WHERE Age NOT NULL”的写法正确

查看答案
更多问题

模糊查询(),可以检索出以“Tc”开头的所有字符串

A. LIKE'Tc_'
B. LIKE'%Tc_'
C. LIKE'Tc%'
D. LIKE'%Tc%'

从产品表Products中查询前10行商品的单价UnitPrice之和,正确的SQL是()

A. SELECT TOP 10 SUM(UnitPrice) AS单价之和FROM Products
B. SELECT SUM(UnitPrice) AS单价之和TOP 10 FROM Products
C. SELECT TOP 10 COUNT(UnitPrice) AS单价之和FROM Products
D. SELECT SUM(UnitPrice) TOP 10 AS单价之和FROM Products

Student表中所有电话号码(列名:telephone)的第一位为8或6,第三位为0的电话号码( )。

A. SELECT telephone FROM student WHERE telephone LIKE '[8,6]%0*'
B. SELECT telephone FROM student WHERE telephone LIKE '(8,6)*0%'
C. SELECT telephone FROM student WHERE telephone LIKE '[8,6]_0%'
D. SELECT telephone FROM student WHERE telephone LIKE '[8,6]_0*'

现有学生成绩表Student_info,其中包括姓名(stu_name),学号(stu_id),成绩(stu_grade)。我们需要查询成绩为80分的学生姓名,要求结果按照学号降序排列。下面查询语句正确的是( )。

A. SELECT stu_name FROM student_info Where stu_grade=80 ORDER BY stu_id ASC
B. SELECT stu_name FROM student_info WHERE stu_grade=80 ORDER BY stu_id DESC
C. SELECT stu_id,stu_name FROM student_info WHERE stu_grade=80 ORDER BY stu_name ASC
D. SELECT stu_name FROM student_info WHERE stu_grade LIKE 80 ORDER BY stu_id DESC

答案查题题库