查询student表中的所有非空email信息,以下语句正确的是()。A、Select email from student where email !=nullB、Select email from student where email not is nullC、Select email from student where email <> nullD、Select email from student where email is not null

题目

查询student表中的所有非空email信息,以下语句正确的是()。

  • A、Select email from student where email !=null
  • B、Select email from student where email not is null
  • C、Select email from student where email <> null
  • D、Select email from student where email is not null

相似考题
参考答案和解析
正确答案:D
更多“查询student表中的所有非空email信息,以下语句正确的是()。A、Select email from student where email !=nullB、Select email from student where email not is nullC、Select email from student where email nullD、Select email from student where email is not null”相关问题
  • 第1题:

    根据SQL标准,下面哪条语句与select min(age) from student等效?()

    A select age from student where age >= min(age)

    B select distinct age from student where age >= all min(age)

    C select distinct a.age from student a where a.age<= any (select distinctb.age from student b)

    D select distinct a.age from student a where a.age<= all (select distinct b.age from student b)


    参考答案D

  • 第2题:

    查找学生姓名及其所选修课程的课程号和成绩,正确的SQL语句是

    A.SELECT sname FROM student,SELECT cno,grade FROM sc WHERE student.sno=sc.sno

    B.SELECT sname,cno,grade FROM student,course WHERE student.sno=course.cno

    C.SELECT sname,cname,grade FROM student,course,sc WHERE student.sno=sc.sno and sc.cno=course,cno

    D.SELECT sname,cno,grade FROM student,sc WHERE student.sno=sc.sno


    正确答案:D
    解析:题意中要求查找学生姓名、课程号和成绩,这三个属性可以查找两个关系表student和sc,通过条件student.so=sc.so进行连接。

  • 第3题:

    使用SQL语句从表STUDENT中查询所有姓王的同学的信息,正确的命令是:______。

    A.SELECT*FROM STUDENT WHERE LEFT(姓名,2)=“王”

    B.SELECT*FROM STUDENT WHERE RIGHT(姓名,2)=“王”

    C.SELECT*FROM STUDENT WHERE TRIM(姓名,2)=“王”

    D.SELECT*FROM STUDENT WHERE STR(姓名,2)=“王”


    正确答案:A
    解析:本题主要考查的是截取字符串的函数,利用LEFT()函数可以从指定的字符串的第一个字符开始截取指定长度的字符串。

  • 第4题:

    对于学生信息表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是

    A.SELECT sno,sname FROM student WHERE grade=NULL

    B.SELECT sno,sname FROM student WHERE grade IS NULL

    C.SELECT sno,age FROM student WHERE grade IS NULL

    D.SELECT sno,age FROM student WHERE grade=NULL


    正确答案:B
    解析:A),D)选项中,不能写成列名=NULL;C),D)选项查询的字段不正确。

  • 第5题:

    要找出籍贯是湖北或湖南的学生的姓名和性别,下述SQL语句正确的有哪三项()。

    • A、SELECT Sname,Ssex FROM Student WHERE Sdept=(‘湖南’,‘湖北’);
    • B、SELECT Sanme,Ssex FROM Student WHERE Sdept=’湖南’ORSdept=’湖北’;
    • C、SELECT Sname,Ssex FROM Student WHERE Sdep tLIKE‘湖%’
    • D、SELECT Sname,Ssex FROM Student WHERE Sdept LIKE‘%湖’;
    • E、SELECT Sname,Ssex FROM Student WHERE Sdept IN(‘湖南’,‘湖北’);

    正确答案:B,C,E

  • 第6题:

    数据库中有一张表名称为Student,有列Number,Name,Age,IDCard,Sex。主键为Number。要求查询所有男同学信息,下列哪个SQL语句是正确的?()

    • A、Select* From Student Where Sex=’男’
    • B、Select* From Student Where Number NotIn(Select Number From Student Where Sex<>=’男’)
    • C、Select* From Student Where NumberIn(Select Numbe rFrom Student Where Sex=’男’)
    • D、Select* From Student Where Sex<>’男’

    正确答案:A,B

  • 第7题:

    数据库中有一张表名称为Student,列ZZMM表示学生政治面貌,学生的政治面貌可能为“党员”、“团员”和群众,要求查询政治面貌为“党员”和“团圆的学生信息”,下列哪个SQL语句是正确的()

    • A、Select* From Student Where ZZMM=’党员’And ZZMM=’团员’
    • B、Select* From Student Where ZZMM=’党员’Or ZZMM=’团员’
    • C、Select* From Student Where ZZMM="党员"OrZ ZMM="团员"
    • D、Select* From Student Where ZZMM IN(’党员’,‘团员’)

    正确答案:A,D

  • 第8题:

    查询student表中的所有非空email信息,以下语句正确的是()

    • A、Select email from student where email!=null
    • B、Select email from student where emailnotisnull
    • C、Select email from student where email<>null
    • D、Select email from student where emailisnotnull

    正确答案:D

  • 第9题:

    The STUDENT_GRADES table has these columns: STUDENT_ID NUMBER(12) SEMESTER_END DATE GPA NUMBER(4,3) Which statement finds the highest grade point average (GPA) per semester?()

    • A、SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL;
    • B、SELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;
    • C、SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end;
    • D、SELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student_grades;
    • E、SELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;

    正确答案:C

  • 第10题:

    查询名字中第2个字为“阳”的学生的姓名和学号,正确的是()

    • A、Select Sname,Sno from student where Sname like‘_阳%’;
    • B、Select Sname,Sno from student where Sname like‘阳%’;
    • C、Select Sname,Sno from student where Sname like‘_阳’;
    • D、Select Sname,Sno from student where Sname like‘阳_%’;

    正确答案:A

  • 第11题:

    单选题
    查询student表中的所有非空email信息,以下语句正确的是()。
    A

    Select email from student where email !=null

    B

    Select email from student where email not is null

    C

    Select email from student where email <> null

    D

    Select email from student where email is not null


    正确答案: D
    解析: 暂无解析

  • 第12题:

    多选题
    数据库中有一张表名称为Student,有列Number,Name,Age,IDCard,Sex。主键为Number。要求查询所有男同学信息,下列哪个SQL语句是正确的?()
    A

    Select* From Student Where Sex=’男’

    B

    Select* From Student Where Number NotIn(Select Number From Student Where Sex<>=’男’)

    C

    Select* From Student Where NumberIn(Select Numbe rFrom Student Where Sex=’男’)

    D

    Select* From Student Where Sex<>’男’


    正确答案: A,B
    解析: 暂无解析

  • 第13题:

    根据SQL标准,要查询表student中所有年龄age小于所有学生的平均年龄的记录,下面哪条语句适用?()

    A select * from student where age< avg(age)

    B select * from student having age< avg(age)

    C select * from student a where a.age< (select avg(b.age) from student b)

    D select * from student a where (select avg(b.age) from student b ) >= a.age


    参考答案C

  • 第14题:

    对于数据表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是______。

    A.SELECT sno,sname FROM student WHERE gade=NULL

    B.SELECT sno,sname FROM student WHERE grade IS NULL

    C.SELECT sno,age FROM student WHERE grade IS NULL

    D.SELECT mo,age FROM student WHERE grade=NULL


    正确答案:B
    解析:A、D选项中,不能写成列名=NULL;C、D选项查询的字段不正确。

  • 第15题:

    对于学生信息表:student(sno,sname,sex,age,dept),要查询所有刘姓学生的信息,正确的语句是

    A.SELECT * FROM student WHERE sname LIKE'刘 * '

    B.SELECT * FROM student WHERE sname LIKE'刘 $'

    C.SELECT * FROM student WHERE sname LIKE'刘%'

    D.SELECT * FROM student WHERE sname LIKE'刘&'


    正确答案:C
    解析:%符号可以表示可以和任意长的字符串匹配。掌握SQL语言中其它特殊符号的含义和用法。

  • 第16题:

    已知有关系“STUDENT”,则关系运算σANE<80(STUDENT)用SQL语句表示为(52)。

    A.SELECT( * )FROM STUDENT WHERE AVE < 80

    B.SELECT( * )FROM STUDENT HAVING AVE < 80

    C.SELECT(AVE)FROM STUDENT WHERE AVE < 80

    D.SELECT(AVE) FROM STUDENT HAVING AVE < 80


    正确答案:A
    解析:σAVE80(STUDENT)表示将关系STUDENT中满足条件“AVE80”的元组选择出来。

  • 第17题:

    若要检索“Student”数据表中的所有记录和字段,则SQL语句为()

    • A、Selec t姓名,性别 From Student
    • B、Select*From Student
    • C、Select 姓名,性别 From Student Where 姓名=“张山“
    • D、Select*From Student Where 姓名=“张山“

    正确答案:B

  • 第18题:

    数据库中有一张表名称为Student,有列Name,Age,IDCard,Sex。要求写SQL语句查询出表中年龄介于20和30岁之间的数据,下列哪个SQL语句是正确的?()

    • A、Select* From Student Where Age>=20 ANDAge>=30
    • B、Select* From Student Where Age>=20 ANDAge<=30
    • C、Select* From Student Where Age BET WENN 20AND30
    • D、Select* From Student Where Age>=20&&Age>=30"

    正确答案:A,C

  • 第19题:

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

    • A、SELECT telephone FROM student WHERE telephoneLIKE’[8,6]%0*’
    • B、SELECT telephone FROM student WHERE telephoneLIKE’(8,6)*0%’
    • C、SELECT telephone FROM student WHERE telephoneLIKE’[8,6]_0%’
    • D、SELECT telephone FROM student WHERE telephoneLIKE’[8,6]_0*’

    正确答案:C

  • 第20题:

    在Transact-SQL语法中,以下SELECT语句正确的是()。

    • A、SELECT * FROM student
    • B、SELECT * FROM student WHERE GETDATE()
    • C、SELECT * FROM student ORDER st_id
    • D、SELECT * FROM student BY St_name

    正确答案:A

  • 第21题:

    The STUDENT_GRADES table has these columns: STUDENT_ID NUMBER(12) SEMESTER_END DATE GPA NUMBER(4,3) Which statement finds the highest grade point average (GPA) per semester?()

    • A、SELECT MAX (gpa) FROM student _ grades WHERE gpa IS NOT NULL;
    • B、SELECT (gpa) FROM student _ grades GROUP BY semester_end WHERE gpa IS NOT NULL;
    • C、SELECT MAX (gpa) FROM student _ grades WHERE gpa IS NOT NULL GROUP BY semester_end;
    • D、SELECT MAX (gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student _ grades;
    • E、SELECT MAX (gpa) FROM student _ grades GROUP BY semester_end WHERE gpa IS NOT NULL;

    正确答案:C

  • 第22题:

    单选题
    查询student表中的所有非空email信息,以下语句正确的是()
    A

    Select email from student where email!=null

    B

    Select email from student where emailnotisnull

    C

    Select email from student where email<>null

    D

    Select email from student where emailisnotnull


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    查询student表中的所有非空email信息,以下语句正确的是()。
    A

    Select email from student where email !=null

    B

    Select email from student where email not is null

    C

    Select email from student where email<>null

    D

    Select email from student where email is no tnull


    正确答案: A
    解析: 暂无解析