题目内容

student表设计如下,查询所有年龄在18-25岁之间的学生姓名和性别的正确SQL语句是()

A. select sname ,sex from student where (year(getdate())-YEAR(birth))>=18 and (year(getdate())-YEAR(birth))<=25;
B. select sname ,sex from student where birth between 18 and 25;
C. select sname ,sex from student where YEAR<=1997 and YEAR>=1990;
D. select sname ,sex from student where birth in (1997,1990);

查看答案
更多问题

要查询book表中所有书名中包含“计算机”的书籍情况,可用( )语句。

A. SELECT * FROM book WHERE book_name LIKE ‘%计算机%’
B. SELECT * FROM book WHERE book_name LIKE ‘计算机%’
C. SELECT * FROM book WHERE book_name = ‘计算机*’
D. SELECT * FROM book WHERE book_name = ‘计算机%’

查询course表中的前5行,正确的语法是( )。

A. select top 5 * from course
B. select top(5) from course
C. select top 5 from course
D. select top(5*) from course

select * from student where sno=’05880101’ union select * from student where sno=’05880102’ 与此查询语句等价的选项是( )。

A. select * from student where sno=’05880101’ and sno= ’05880102’
B. select * from student where sno=’05880101’ or sno= ’05880102’
C. select * from student where sno=’05880101’
D. select * from student where sno=’05880102’

由两个模数分别为M和N的计数器级联成的计数器,其总的模数为

A. M
B. N
C. MN
D. M/N

答案查题题库