对于学生信息表S(SNUMBER,SNAME,SEX,AGE,DEPT)(STUDENT 由学号 SNO,姓名SNAME,性别SEX,年龄AGE,所在系DEPT5个属性组成,其中SNUMBER为主码),求年龄20~23岁之间的学生姓名和年龄,正确的语句是( )。A.SELECT SNAME,AGE FROM S WHERE AGE>20 AND AGE<23B.SELECT SNAME,AGE FROM S WHERE AGE BETWEEN 20 AND 23C.SELECT *FROM S WHERE. AGE BETWEEN 20 AND 23D.以上均不正确
对于学生信息表S(SNUMBER,SNAME,SEX,AGE,DEPT)(STUDENT 由学号 SNO,姓名SNAME,性别SEX,年龄AGE,所在系DEPT5个属性组成,其中SNUMBER为主码),求年龄20~23岁之间的学生姓名和年龄,正确的语句是( )。
A.SELECT SNAME,AGE FROM S WHERE AGE>20 AND AGE<23
B.SELECT SNAME,AGE FROM S WHERE AGE BETWEEN 20 AND 23
C.SELECT *FROM S WHERE. AGE BETWEEN 20 AND 23
D.以上均不正确
相关考题:
( 32 ) 设有学生信息关系 STUDENT ( sno , sname , sex , age , dept ) 。 “ 查找信息系 ( IS 系 ) 中年龄小 于20 岁的学生的姓名 ” ,该操作正确的关系代数表达式是Ⅰ . π sname ( σ dept= ’ IS ’ ∧ age20( STUDENT ))Ⅱ . σ dept= ’ IS ’ ∧ age20 ( π sname ( STUDENT ))Ⅲ . σ sname ( π dept= ’ IS ’ ∧ age20( STUDENT ))A )仅 ⅠB )仅 ⅡC ) Ⅰ 和 ⅡD ) Ⅱ 和 Ⅲ
对于学生信息表:student(sno,sname,sex,age,dept),如果把学生“小明”的姓名改为“小强”,则正确的语句是( )。A)UPDATE SET sname=‘小明’WHERE sname=‘小强’B)UPDATE student SET sname=‘小明’WHERE sname=‘小强’C)UPDATE student SET sname=‘小强’D)UPDATE student SET sname=‘小强’WHERE sname=‘小明’
第(38)~(40) 题基于学生一课程数据库中的3个基本表:学生信息表:s(sno,sname,sex,age,dept)主码为sno课程信息表:c(cno,cname,teacher)主码为cno学生选课信息表:sc(sno,cno,grade)主码为(sno,cno)实现“从学生信息表中找出性别为女的学生姓名”的SQL语句是A.SELECT * FROM sB.SELECT * FROM s WHERE sex='女'C.SELECT sname FROM s WHERE sex='女'D.SELECT * FROM s WHERE grade="
对于学生信息表:student(sno,sname,sex,age,dept),能够得到年龄在20岁到22岁之间的学生的姓名和学号的语句是A.SELECT * FROM student WHERE age BETWEEN 20 AND 22B.SELECT sname,sno FROM student WHERE age BETWEEN 20 AND 22C.SELECT sname,sno FROM student WHERE age>=20D.SELECT sname,sno FROM student WHERE age<=22
对于学生信息表:student(sno,sname,sex,age,dept),如果把学生“张明”的姓名改为“张岩”,则正确的语句是A.UPDATE SET sname='张明'WHERE sname='张岩'B.UPDATE student SET shame='张明'WHERE shame='张岩'C.UPDATE student SET sname='张岩'D.UPDATE student SET sname='张岩'WHERE sname='张明'
对于学生信息表S(SNUMBER,SNAME,SEX,AGE,DEPT)(STUDENT由学号SN0,姓名SNAME,性别SEX,年龄AGE,所在系DEPT5个属性组成,其中SNUMBER为主码),求年龄20~23岁之间的学生姓名和年龄,正确的语句是( )。A) SELECT SNAME, AGE FROM S WHERE AGE20 OR AGE23B) SELECT SNAME, AGE FROM S WHERE AGE BETWEEN 20 AND 23C) SELECT * FROM S WHERE AGE BETWEEN 20 AND 23D) 以上均不正确
以下2题基于以下说明。设有三个关系:学生关系S(SNO,SNAME,AGE,SEX) (分别代表学生的学号、姓名、年龄、性别)学习关系SC(SNO,CNO,GRADE) (分别代表学生的学号、课程编号、成绩)若在关系S中查找姓名中第一个字为′王′的学生的学号和姓名。下面列出的SQL语句中,正确的是A.SELECT SNO,SNAME FROM S WHERE SNAME=′王%′B.SELECT SNO,SNAME FROM S WHERE SNAME=′王_′C.SELECT SNO,SNAME FROM S WHERE SNAME LIKE′王%′D.SELECT SNO,SNAME FROM S WHERE SNAME LIKE′王_′
设有学生数据库:student(sno,sname,sex,age,dept)。现要查询所有刘姓学生的信息,可使用如下的 SQL语句:SELECT*FROM student WHERE【 】。
根据SQL标准,增加一条记录到表student,学号sno是11301,姓名sname是“snoopy”,年龄age是20。其中student表中包括学号、姓名、年龄、籍贯、系别等属性,并且属性除sno外皆可取空值。下面哪条是参考的?()A insert into student values(sno=11301, sname=’snoopy’, age =20)B insert into student(sno,sname,age) values(11301,’snoopy’,20)C insert into student set sno=11301, sname=’snoopy’, age = 20D insert into student values (11301, ’snoopy’, 20)
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,Age),S的属性分别表示学生的学号、姓名、性别、年龄。要在表S中删除一个属性“年龄”,可选用的SQL语句是( )。A. DELETE Age from S B. ALTER TABLE S DROP AgeC. UPDATE S Age D. ALTER TABLE S ‘Age’
对于数据表: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
以下2题基于以下说明。设有三个关系:学生关系S(SNO,SNAME,AGE,SEX)(分别代表学生的学号、姓名、年龄、性别)学习关系SC(SNO,CNO,GRADE)(分别代表学生的学号、课程编号、成绩)若在关系S中查找姓名中第一个字为'王'的学生的学号和姓名。下面列出的SQL语句中,正确的是A.SELECT SNO,SNAME FROMSWHERE SNAME='王%.'B.SELECT SNO,SNAME FROM S WHERE SNAME='王_'C.SELECT SNO,SNAMEFROMS WHERE SNAME LIKE '王%.'D.SELECT SNO,SNAME FROM S WHERE SNAME LIKE '王_'
对于学生信息表: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'刘'
建立一个学生信息表student,要求它由学号sno、姓名sname、性别sex、年龄age4个属性组成,其学号属性唯一,学号、姓名字段不能为空。下列语句正确的是A.CREATE TABLE student(sno char(5) NOT NULL sname char(8) NOT NULL sex char(1) age int);B.CREATE TABLE student (sno char(5) NOT NULL UNIQUE sname char(8) sex char(1) age int);C.CREATE TABLE (sno char(5) NOT NULL UNIQUE sname char(8) NOT NULL sex char(1) age int);D.CREATE TABLE student (sno char(5) NOT NULL UNIQUE sname char(8) NOT NULL sex char(1) age int);
对于学生信息表:student(sno, sname, sex, age, dept),能够得到年龄在20岁于22岁之间的学生的姓名和学号的语句是A.SELECT * FROM student WHERE age BETWEEN 20 AND 22B.SELECT sname, sno FROM student WHERE age BETWEEN 20 AND 22C.SELECT sname,sno FROM student WHERE age>=20D.SELECT shame,sno FROM student WHERE age<=22
对于学生信息表:student(sno, sname, sex, age, dept),如果把学生“张明”的姓名改为“张岩”,则正确的语句是A.UPDATE SET sname='张明'WHERE sname='张岩'B.UPDATE student SET sname='张明' WHERE sname='张岩'C.UPDATE student SET sname='张岩'D.UPDATE student SET sname='张岩' WHERE sname='张明'
对于学生信息表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是A.SELECT sno,sname FROM student WHERE grade=NULLB.SELECT sno,sname FROM student WHERE grade IS NULLC.SELECT sno,age FROM student WHERE grade IS NULLD.SELECT sno,age FROM student WHERE grade=NULL
对于学生信息表:student(sno,shame,sex,age,dept),如果把学生“张明”的姓名改为“张岩”,则正确的语句是A.UPDATE SET sname='张明'WHERE sname='张岩'B.UPDATE student SET sname='张明'WHERE sname='张岩'C.UPDATE student SET sname='张岩'D.UPDATE student SET sname='张岩'WHERE sname='张明'
设有学生信息关系STUDENT(sno,sname,sex,age,dept)。“查找信息系(IS系)中年龄小于20岁的学生的姓名”,该操作正确的关系代数表达式是( )。A)仅ⅠB)仅ⅡC)Ⅰ和ⅡD)Ⅱ和Ⅲ
建立一个学生信息表student,要求它由学号sno,姓名sname,性别sex,年龄age,4个属性组成,其学号属性惟一,学号、姓名字段不能为空。下列语句正确的是A.CREATE TABLE student (sno char(5)NOT NULL sname char(8)NOT NULL sex char age int);B.CREATE TABLE student (sno char(5)NOT NULL UNIQUE sname char(8) sex char age int);C.CREATE TABLE (sno char(5)NOT NULL UNIQUE sname char(8)NOT NULL sex char age int);D.CREATE TABLE student (sno char(5)NOT NULL UNIQUE sname char(8)NOT NULL sex char age int);
用SQL语言定义下列学生关系模式:S(SNO,SNAME,SEX,AGE,CLASS_ID)假设规定学生年龄在16-25岁之间,学号(SNO),姓名(SNAME)非空,性别属性域是{男,女},CLASS_ID为班号。试用SQL语言定义这些完整性约束。
假定学生关系是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 ())。
对于学生信息表(XSB),包含字段:学号(SNO),姓名(SNAME),性别(SEX),年龄(AGE),所在系(DEPT),其中SNO为主码,检索年龄在20~30之间的学生姓名和年龄,正确的语句是()A、select sname,age from xsb where age20and age23B、select*from xsb where age between20 and 23C、select sname,age from xsb where agebetween20 and 23
学生表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