网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

11、已经创建了如下视图,那么要查询所有男生姓名的最简洁SQL语句是________。 CREATE VIEW V_StSexMale AS SELECT StCode As 姓名, StName As 姓名, ClsCode As 班号, Sex As 性别 FROM Student WHERE Sex='男'

A.Select StName, Sex From V_StSexMale Where Sex='男'

B.Select StName, Sex From V_StSexMale

C.Select 姓名, 性别 From V_StSexMale Where Sex='男'

D.Select 姓名, 性别 From V_StSexMale


参考答案和解析
1 添加数据源 2 选择查询类型 3 选择输出字段 4 记录筛选 5 其它
更多 “11、已经创建了如下视图,那么要查询所有男生姓名的最简洁SQL语句是________。 CREATE VIEW V_StSexMale AS SELECT StCode As 姓名, StName As 姓名, ClsCode As 班号, Sex As 性别 FROM Student WHERE Sex='男'A.Select StName, Sex From V_StSexMale Where Sex='男'B.Select StName, Sex From V_StSexMaleC.Select 姓名, 性别 From V_StSexMale Where Sex='男'D.Select 姓名, 性别 From V_StSexMale” 相关考题
考题 (34)查询所有目前年龄是22岁的学生信息:学号,姓名和年龄,正确的命令组是A)CREATE VIEW AGE LIST AS; SELECT学号,姓名,YEAR(DATEQ)-YEAR(出生日期)年龄FROM学生; SELECT学号,姓名,年龄FROM AGE LIST WHERE年龄=22B)CREATE VIEW AGE LIST AS; SELECT学号,姓名,YEAR(出生日期)FROM学生;SELECT学号,姓名,年龄FROM AGE -L IST WHERE YEAR(出生日期)=22C)CREATE VIEW AGE LIST AS; SELECT学号,姓名,YEAR(DATEQ)-YEAR(出生日期)年龄FROM学生; SELECT学号,姓名,年龄FROM学生WHERE YEAR(出生日期)=22D)CREATE VIEW AGE LIST AS STUDENT; SELECT学号,姓名,YEAR(DATE())-YEAR(出生日期)年龄FROM学生;SELECT学号,姓名,年龄FROM STUDENT WHERE年龄=22

考题 使用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)=“王”

考题 下列SQL查询语句中,与下面查询设计视图所示的查询结果等价的是( )。A.SELECT姓名,性别,所属院系,简历FROM tStud WHERE性别="女"AND所属院系In("03","04")B.SELECT姓名,简历FROM tStud WHERE性别="女"AND所属院系In("03","04")C.SELECT姓名,性别,所属院系,简历FROM tStud WHERE性别="女"AND所属院系="03"OR所属院系="04"D.SELECT姓名,简 FROM tStud WHERE性别="女"AND所属院系="03"OR所属院系="04"

考题 检索所有比“王华”年龄大的学生的姓名、年龄和性别,正确的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

考题 实现“从学生信息表中找出性别为女的学生姓名”的SQL语句是A.SELECT*FROMsB.SELECT*FROM s WHERE sex='女'C.SELECT sname FROM s WHERE sex='女'D.SELECT*FROM s WHERE grade="

考题 用SQL命令生成含有字段职工号、姓名的视图,下列语句正确的是______。A.CREATE VIEW ZG w AS SELECT职工号,姓名FROM职工B.CREATE QUERY ZG w AS SELECT职工号,姓名FROM职工C.CREATE VIEW ZG w AS SELECT职工号,姓名D.CREATE QUERY ZG w AS SELECT职工号,姓名

考题 创建一个名为RS的视图,用来显示所有学生的学号,姓名和平均成绩,下面正确的语句是__A SELECT STUDENT.学号,STUDENT.姓名,SKB.平均成绩 WHERE STUDENT.学号 = SKB.学号 GROUP BY STUDENT.学号 INTO CURSOR RSB CREATE VIEW RS AS SELECT STUDENT.学号,STUDENT.姓名,SKB.平均成绩 WHERE STUDENT.学号 = SKB.学号 GROUP BY STUDENT. 学号C SELECT STUDENT.学号,STUDENT.姓名,SKB 平均成绩 WHERE STUDENT.学号 = SKB.学号 GROUP BY STUDENT.学号 INTO CURSOR RSD CREATE VIEW RS AS SELECT STUDENT.学号,STUDENT.姓名,AVG(SKB.成绩) AS 平均成绩 WHERE STUDENT.学号 = SKB.学 号 GROUP BY STUDENT.学号

考题 查询比任何一个男生入校总分高的女生的姓名和入校总分。请填空补充下面的SELECT-SQL语句: SELECT姓名,入校总分 FROM 学生表WHERE【 】; (SELECT【 】FROM 学生 WHERE性别=“男”); AND【 】/ * 注意:此行是父查询中的条件*/

考题 设有学生数据库:student(sno,sname,sex,age,dept)。现要查询所有刘姓学生的信息,可使用如下的 SQL语句:SELECT*FROM student WHERE【 】。

考题 根据SQL标准,创建一个视图abc,通过该视图只能对表student中系dept为‘IS’的记录进行更新操作。下面哪条语句适用?()A create view abc as select * from student where dept=’IS’B create view abc as select * from student where dept=’IS’ with check optionC create view abc as student where dept=’IS’D create view abc as select dept=’IS’ from student

考题 用SQL命令生成含有字段职工号、姓名的视图,下列语句正确的是 ______。A.CREATE VIEW ZG_w AS SELECT职工号,姓名FROM职工B.CREATE QUERY ZG_w AS SELECT职工号,姓名FROM职工C.CREATE VIEW ZG w AS SELECT职工号,姓名D.CREATE QUERY ZG_w AS SELECT职工号,姓名

考题 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

考题 查询所有目前年龄是22岁的学生信息:学号,姓名和年龄,正确的命令组是( )。A.CREATE VIEW AGE LIST AS; SELECT 学号,姓名,YEAR(DATE())-YEAR(出生日期)年龄FROM学生; SELECT 学号,姓名,年龄FROM AGE LIST WHERE年龄=22B.CREATE VIEW AGE LIST AS; SELECT 学号,姓名,YEAR(出生日期) FROM 学生; SELECT 学号,姓名,年龄FROM AGE LIST WHERE YEAR(出生日期)=22C.CREATE VIEW AGE LIST AS; SELECT 学号,姓名,YEAR(DATE())-YEAR(出生日期)年龄FROM学生; SELECT 学号,姓名,年龄FROM学生WHEREYEAR(出生日期)=22D.CREATE VIEW AGE LIST AS STUDENT; SELECT学号,姓名,YEAR(DATE())-YEAR(出生日期)年龄FROM学生; SELECT学号,姓名,年龄FROM STUDENT WHERE年龄=22

考题 利用SQL命令从职工表中派生出含有“职工号”、“姓名”字段的视图,下列语句正确的是A) CREATE VIEW ZG_view; SELECT 职工号,姓名FROM职工表B.CREATE VIEW ZG_view AS; SELECT 职工号,姓名 FROM 职工表C.CREATE QUERY ZG_view; SELECT 职工号,姓名 FROM 职工表D.CREATE QUERY ZG_view AS; SELECT 职工号,姓名 FROM 职工表

考题 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

考题 对于学生信息表STUDENT(SNO, SNAME,SEX,AGE,DEPT)(STUDENT由学号SNO、姓名SNAME、性别SEX、年龄AGE、所在系DEPT 5个属性组成,其中SNO为主码),求年龄20~23岁之间的学生姓名和年龄,正确的语句是( )。A.SELECT SNAME,AGE FROM STUDENT WHERE AGE20 AND AGE23B. SELECT*FROM STUDENT WHERE AGE BETWEEN 20 AND 23C.SELECT SNAME,AGE FROM STUDENT WHERE AGE BETWEEN 20 AND 23D.以上均不正确

考题 有关系S(S#,SNAME,SEX),C(C#,CNAME),SC(S#,C#,GRADE)。其中S#是学生号,SNAME是学生姓名,SEX是性别, C#是课程号,CNAME是课程名称。要查询选修“数据库”课的全体男生姓名的SQL语句是SELECT SNAME FROM S,C,SC WHERE子句。这里的WHERE子句的内容是( )。A.S.S# = SC.S# and C.C# = SC.C# and SEX=’男’ and CNAME=’数据库’B.S.S# = SC.S# and C.C# = SC.C# and SEX in’男’and CNAME in’数据库’C.SEX ’男’ and CNAME ’ 数据库’D.S.SEX=’男’ and CNAME=’ 数据库’

考题 对于数据表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是______。A.SELECT sno,sname FROM student WHERE gade=NULLB.SELECT sno,sname FROM student WHERE grade IS NULLC.SELECT sno,age FROM student WHERE grade IS NULLD.SELECT mo,age FROM student WHERE grade=NULL

考题 使用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)=“王”

考题 已知基本表:学生(学号,姓名,性别,年龄,系名)选课(学号,课程号,成绩)要检索所有比“王华”年龄大的学生姓名、年龄和性别,正确的语句是(25),要检索学生姓名及其所选修课程的课程号和成绩,正确的语句是(26)。A.SELECT姓名,年龄,性别 FROM学生 WHERE AGE>(SELECT年龄 FROM学生 WHERE姓名=“王华”)B.SELECT姓名,年龄,性别 FROM学生 WHERE姓名:“王华”C.SELECT姓名,年龄,性别 FROM学生 WHERE AGE>(SELECT年龄 WHERE姓名=“王华”)D.SELECT姓名,年龄,性别 FROM学生 WHERE AGE>“王华”

考题 查询所有目前年龄是22岁的学生信息:学号,姓名和年龄,正确的命令组是A.CREATE VIEW AGE_LIST AS; SELECT学号,姓名,YEAR(DATE())-YEAR(出生日期)年龄FROM学生; SELECT学号,姓名,年龄FROM AGE_LIST WHERE年龄=22B.CREATE VIEW AGE_LIST AS; SELECT学号,姓名,YEAR(出生日期)FROM学生: SELECT学号,姓名,年龄FROM AGE_LIST WHERE YEAR(出生日期)=22C.CREATE VIEW AGE_LIST AS; SELECT学号,姓名,YEAR(DATE())-YEAR(出生日期)年龄FROM学生; SELECT学号,姓名,年龄FROM学生WHERE YEAR(出生日期)=22D.CREATE VIEW AGE_LIST AS STUDENT; SELECT学号,姓名,YEAR(DATE()).YEAR(出生日期)年龄FROM学生; SELECT学号,姓名,年龄FROM STUDENT WHERE年龄=22

考题 利用SQL命令从职工表中派生出含有“职工号”、“姓名”字段的视图,下列语句正确的是A.CREATE VIEW ZG_view; SELECT职工号,姓名FROM职工表B.CREATE VIEW ZG_view AS; SELECT职工号,姓名FROM职工表C.CREATE QUERY ZG_view; SELECT职工号,姓名FROM职工表D.CREATE QUERY ZG_view AS; SELECT职工号,姓名FROM职工表

考题 检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的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

考题 假定学生关系是S(SNO,SNAME,SEX,AGE),其属性是学号,姓名,性别,年龄;课程关系是C(CNO,CNAME),属性是课程号,课程名;学生选课关系是SC(SNO,CNO,GRADE),属性是学号,课程号,成绩。要查找选修“COMPUTER”课程的“女”学生姓名,将涉及到关系有()、()、(),SQL语句为:SELECT SNAME FROM WHERE S.SNO=SC.SNO AND SC.CNO=C.CNO AND();查询所有课程都及格的学生学号,姓名,SQL语句为:SELECT SNO, SNAME FROM()WHERE() (SELECT * FROM SC WHERE S.SNO=SC.SNO AND ())。

考题 若要检索“Student”数据表中的所有记录和字段,则SQL语句为()A、Selec t姓名,性别 From StudentB、Select*From StudentC、Select 姓名,性别 From Student Where 姓名=“张山“D、Select*From Student Where 姓名=“张山“

考题 数据库中有一张表名称为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’男’

考题 单选题若要检索“Student”数据表中的所有记录和字段,则SQL语句为()A Selec t姓名,性别 From StudentB Select*From StudentC Select 姓名,性别 From Student Where 姓名=“张山“D Select*From Student Where 姓名=“张山“

考题 多选题数据库中有一张表名称为Student,有列Number,Name,Age,IDCard,Sex。主键为Number。要求查询所有男同学信息,下列哪个SQL语句是正确的?()ASelect* From Student Where Sex=’男’BSelect* From Student Where Number NotIn(Select Number From Student Where Sex=’男’)CSelect* From Student Where NumberIn(Select Numbe rFrom Student Where Sex=’男’)DSelect* From Student Where Sex’男’