已知SN是一个字符型字段,下列SQL查询语句() SELECT SN FROM S WHERE SN LIKE′AB%′;的执行结果为A.找出含有3个字符′AB%′的所有SN字段B.找出仅含3个字符且前两个字符为′AB′的SN字段C.找出以字符′AB′开头的所有SN字段D.找出含有字符′AB′的所有SN字段
已知SN是一个字符型字段,下列SQL查询语句() SELECT SN FROM S WHERE SN LIKE′AB%′;的执行结果为
A.找出含有3个字符′AB%′的所有SN字段
B.找出仅含3个字符且前两个字符为′AB′的SN字段
C.找出以字符′AB′开头的所有SN字段
D.找出含有字符′AB′的所有SN字段
参考答案和解析
找出以字符’ AB ’开头的所有 SN 字段值
相关考题:
第 15~16 题基于以下说明。 设有三个关系:学生关系S(SN0,SNAME,AGE,SEX)(分别代表学生的学号、姓名、年龄、性别)学习关系SC(SN0,CNO,GRADE)(分别代表学生的学号、课程编号、成绩)课程关系C(CN0,CNAME,TEACHER)(分别代表课程的编号、课程名、任课教师)第15题:下列不能实现与关系代数表达式Πsname(σcname=\'DB\' )相同查询的SQL命令是( )。A.SELECT SNAME FROM S,SC,C WHERE S.SN0=SC.SNO AND SC.CNO=C.CNO AND CNAME="DB"B.SELECT SNAME FROM S WHERE SNO IN(SELECT SNO FROM SC,C WHERE SC.CNO=C.CNO AND CNAME="DB")C.SELECT SNAME FROM S WHERE SNO IN(SELECT SNO FROM SC WHERE CNO IN ( SELECT CNO FROM C WHERE CNAME="DB"))D.SELECT SNAME FROM S,C WHERE CNAME="DB"
假定有三个关系,学生关系S、课程关系C和学生选课关系SC,它们的结构如下: S(S#,SN,Sex,Age,Dept),C(C#,CN),SC(S#,C#,Grade)。其中,S#为学生号,SN为姓名,Sex为性别,Age为年龄,Dept为系别,C#为课程号,CN为课程名,Grade为成绩。检索选修课程“C2”的学生中成绩最高的学生的学号,正确的SQL.语句是______。A.SELECT S#FROM SC WHERE C#="C2" AND Grade IN (SELECT Grade FROM SC WHERE C#="C2")B.SELECT S# FROM SC WHERE C#="C2" AND Grade>= (SELECT Grade FROM SC WHERE C#="C2")C.SELECT S# FROM SC WHERE C#="C2" AND Grade>=ALL (SELECT Grade FROM SC WHERE C#="C2")D.SELECT S# FROM SC WHERE C#="C2" AND Gtade NOT IN (SELECT Grade FROM SC WHERE C#="C2")
检索所有比“王华”年龄大的学生的姓名、年龄和性别,正确的SELECT语句是______。A.SELECT SN,AGE,SEX FROM S SHERE AGE>(SELECT AGE FROM S WHERE SN='王华')B.SELECT SN,AGE,SEX FROM S WHERE SN='王华'C.SELECT SN,ACE,SEX FROM S WHERE AGE>(SELECT ACE WHERE SN='王华')D.SELECT SN,ACE,SEX FROM S WHERE ACE>王华 AGE
检索学生姓名及其所选修课程的课程号和成绩,正确的SELECT语句是______。A.SELECT S.SN,SC.C#,SC.GRADE FROMS WHERE S.S#=SC.S#B.SELCECT S.SN,SC.C#,SC.GRADE FROM SC WHERE S.S#=SC.GRADEC.SELECT S.SN,SC.C#,SC,GRADE FROM S,SC WHERE S.S#:SC.S#D.SELSECT S.SN,SC.C#,SC.GRADE FROM S,SC
有下列SQL语句:SELECT 姓名 FROM 作者 WHERE NOT EXISTS; (SELECT*FROM 图书 WHERE 作者编号=作者.作者编号)执行该语句后,查询结果中的字段值是( )。A.1B.赵三立C..T.D..F.
检索所有比"王华"年龄大的学生姓名、年龄和性别。正确的SELECT语句是() A、SELECT SN,AGE,SEX FROM SSHERE AGE>(SELECT AGE FROM S)WHERE SN=’王华’)B、SELECT SN,AGE,SEXFROM SWHERE SN=’王华’C、SELECT SN,ACE,SEX FROM SWHERE AGE>(SELECT ACEWHERE SN=’王华’)D、SELECT SN,ACE,SEX FROM SWHERE ACE>王华AGE
已知有关系模式及(S_N0,S_NAME,AGE),其中S_NO表示学生的学号,类型为Char[8],前4位表示入学年份。查询所有2005年入学的学生姓名(S_NAME),SQL语句是(24)。A.SELECT S_NAME FROM R WHERE S_NO = '2005% 'B.SELECT S_NAME FROM R WHERE S_NO LIKE '2005% 'C.SELECT S_NAME FROM R WHERE S_NO = '2005%'D.SELECT S_NAME FROM R WHERE S_NO LIKE '2005%'
S(S#,SN,SEX,AGE,DEPT) C(C#,CN) SC(S#,C#,GRADE)其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号, CN为课程名,GRADE为成绩。检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的SELECT语句是______。A.SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE FROM S WHERE SN='王华')B.SELECT SN, AGE, SEX FROM S WHERE SN='王华'C.SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE WHERE SN='王华')D.SELECT SN,AGE,SEX FROM S WHERE AGE>王华AGE
查询“教师”表中“住址”字段中含有“望京”字样的教师信息,正确的SQL语句是( )。A.SELECT*FROM教师WHERE住址LIKE"%望京%"B.SELECT*FROM教师FOR住址LIKE"%望京%"C.SELECT*FROM教师FOR住址="%望京%"D.SELECT*FROM教师WHERE地址="%望京%"
查询“教师”表中“住址”字段中含有“望京”字样的教师信息,正确的SQL语句是A) SELECT*FROM教师WHERE住址LIKE”%望京%”B) SELECT*FROM教师FOR住址LIKE”%望京%”C) SELECT*FROM教师FOR住址=”%望京%”D) SELECT* FROM教师WHERE住址=”%望京%”
S(S,SN,SEX,AGE,DEPT)C(C,CN)SC(S,C,GRADE)其中:S为学号,SN为姓名,SEX为性别,AGE为年龄,DEP S(S#,SN,SEX,AGE,DEPT) C(C#,CN) SC(S#,C#,GRADE) 其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号, CN为课程名,GRADE为成绩。检索所有比“王华”年龄大的学生姓名、年龄和性别。 正确的SELECT语句是______。A.SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE FROM S WHERE SN=‘王华’)B.SELECT SN,AGE,SEX FROM S WHERE SN=‘王华’C.SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE WHERE SN=‘王华’)D.SELECT SN,AGE,SEX FROM S WHERE AGE>王华 AGE
现有3个表Students(SID,SN,SEX,AGE,DEPT),Courses(CID,CNAME),SCORE(SID,CID,GRADE)。 其中,SID为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,CID为课程号,CNAME为课程 名,GRADE为成绩。检索“王华”同学所选修的课程名称和成绩,正确的SELECT语句是( )。A. SELECT CNAME,GRADE FROM Students INNER JOIN SCORE ON Students.SID=SCORE.SID INNER JOIN Courses ON SCORE.CID=Courses.CID WHERE SN=’王华’B. SELECT CNAME,GRADE FROM Students INNER JOIN Courses ON Students.SID=Courses.CID WHERE SN=’王华’C. SELECT CNAME,GRADE FROM SCORE INNER JOIN Courses ON SCORE.CID=Courses.CID WHERE CNAME=。王华。D. SELECT CNAME,GRADE FROM Students INNER JOIN Courses ON Students.SN=Courses.CNAME WHERE SN=’王华。
设关系数据库中一个表S的结构为:S(SN,CN,grade),其中SN为学生名,CN为课程名,二者均为字符型;grade为成绩,数值型,取值范围0-100。若要更正王二的化学成绩为85分,则可用( ) 。A. UPDATE SSET grade=85WHERE SN=’王二’ AND CN=’化学’B. UPDATE SSET grade=’85’WHERE SN=’王二’ AND CN=’化学’C. UPDATE grade=85WHERE SN=’王二’ AND CN=’化学’D. UPDATE grade=’85’WHERE SN=’王二’ AND CN=’化学’
There are two tables: students, and scores, in the mysql database (4.0+) exactly like this:SN | Name SN | Score------------- -------------1 | Jerry 1 | 48------------- -------------2 | Lily 2 | 50------------- -------------3 | Roy-------------where the SN is the foreigh key. Write an SQL statement to delete all the names that have no score.
检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的SELECT语句是______。A.SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE FROM S WHERE SN='王华')B.SELECT SN,AGE,SEX FROM S WHERE SN='王华'C.SELECT SN,AGE, SEX FROM S WHERE AGE>(SELECT AGE WHERE SN='王华')D.SELECT SN,AGE,SEX FROM S WHERE AGE>王华 AGE
检索学生姓名及其所选修课程的课程号和成绩。正确的SELECT语句是______。A.SELECT S.SN,SC.C#,SC.GRADE FROM S WHERE S.S#=SC.S#B.SELECT S.SN,SC.C#,SC.GRADE FROM SC WHERE S.S#=SC.GRADEC.SELECT S.SN, SC.C#,SC.GRADE FROM S,SC WHERE S.S#=SC.S#D.SELECT S.SN,SC.C#,SC.GRADE FROM S,SC
设有关系模式日(SC,SN,SA)、S(CP,CW),则SQL语句“SELECT*FORM. R UNION SELECT*FROM S”实现的功能是______。A.RCSB.RUSC.R-SD.R∞S
在ACCESS“学生”表中有学号、姓名、性别、入学成绩、身高字段。现需查询姓名中含有“娟”和“丽”字的学生信息正确的SQL语句是()。A、select*from学生Where姓名=”娟”or姓名=”丽”B、select*from学生Where姓名=”*娟*”or姓名=”*丽*”C、select*from学生Where姓名LIKE”*娟*”or姓名LIKE”*丽*”D、select*from学生Where姓名LIKE”娟”AND姓名=”丽”
已知SN是一个字符类型的字段,有查询语句:SELECT SN FROM S WHERE SN LIKE ’AB%’ 该查询语句的执行结果是()。A、含有3个字符‘AB%’的所有SN字段B、含有字符‘A’或‘B’的所有SN字段C、以字符串‘AB’开始的所有SN字段D、仅含有3个字符且前两个为‘AB’的SN字段
现有三个表即学生表S、课程表C和学生选课表SC,它们的结构如下:S(S#,SN,SEX,AGE,DEPT);C(C#,CN);SC(S#,C#,GRADE)。其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的SELECT语句是()A、SELECT SN,AGE,SEX FROM SWHE RESN=“王华”B、SELECT SN,AGE,SEX FROM SWHE REAGE>(SELECTAGEFROMSWHERESN=“王华”)C、SELECT SN,AGE,SEX FROM SWHE REAGE>(SELECTAGEWHERESN=“王华”)D、SELECT SN,AGE,SEX FROM SWHE REAGE>王华.AGE
设关系数据库中一个表S的结构为:S(SN,CN,grade),其中SN为学生名,CN为课程名,均为字符型;grade为成绩,数值型,下列()选项是正确的。A、DELETE FROM S WHERE SN=’JULIE’B、DELETE*FROM S WHERE SN=’JULIE’C、DELETE FROM S WHERE SN="JULIE"D、DELETE*FROM S WHERE SN="JULIE"
下列哪些SQL语句可以查询出User表中name为张三的记录()。A、SELECT * FROM User WHERE name = ’张三’B、SELECT * FROM User WHERE name = ’张三’ LIMIT 0,1C、SELECT * FROM User WHERE name LIKE ’张三’D、SELECT * FROM User WHERE name LIKE ’%张三%’
学生表S、课程表C和学生选课表SC,它们的结构如下:S(S_NO,SN,SEX,AGE,DEPT) C(C_NO,CN) SC(S_NO,C_NO,GRADE)其中:S_NO为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C_NO为课程号,CN为课程名,GRADE为成绩检索所有比“王华”年龄大的学生姓名、年龄和性别正确的SELECT语句是()A、SELECTSN,AGE, SEX FROM SWHERE AGE>(SELECTAGE FROM S WHERE SN=’王华’)B、SELECTSN,AGE, SEX FROM SC、SELECTSN,AGE,SEX FROM SD、SELECTSN,AGE,SEXFROMS
单选题设关系数据库中一个表S的结构为:S(SN,CN,grade),其中SN为学生名,CN为课程名,均为字符型;grade为成绩,数值型,下列()选项是正确的。ADELETE FROM S WHERE SN=’JULIE’BDELETE*FROM S WHERE SN=’JULIE’CDELETE FROM S WHERE SN=JULIEDDELETE*FROM S WHERE SN=JULIE
单选题现有三个表即学生表S、课程表C和学生选课表SC,它们的结构如下:S(S#,SN,SEX,AGE,DEPT);C(C#,CN);SC(S#,C#,GRADE)。其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的SELECT语句是()ASELECT SN,AGE,SEX FROM SWHE RESN=“王华”BSELECT SN,AGE,SEX FROM SWHE REAGE>(SELECTAGEFROMSWHERESN=“王华”)CSELECT SN,AGE,SEX FROM SWHE REAGE>(SELECTAGEWHERESN=“王华”)DSELECT SN,AGE,SEX FROM SWHE REAGE>王华.AGE
填空题在SQL语句中要查询表s在AGE字段上取空值的记录,正确的SQL语句为:SELECT * FROM s WHERE ()。