有Oracle表”cd”,它包含属性”cdcode”,”category”和”cdname”,你要查询category取值为”CLASSIC”或”ROCK”的行,你采用语句()A、SELECT * FROM cd WHERE category IN (’CLASSIC’,’ROCK’)B、SELECT * FROM cd WHERE category BETWEEN ’CLASSIC’ AND ’ROCK’C、SELECT * FROM cd WHERE category=’CLASSIC’ AND category=’ROCK’D、SELECT * FROM cd WHERE category=’CLASSIC’ OR category=’ROCK’
有Oracle表”cd”,它包含属性”cdcode”,”category”和”cdname”,你要查询category取值为”CLASSIC”或”ROCK”的行,你采用语句()
- A、SELECT * FROM cd WHERE category IN (’CLASSIC’,’ROCK’)
- B、SELECT * FROM cd WHERE category BETWEEN ’CLASSIC’ AND ’ROCK’
- C、SELECT * FROM cd WHERE category=’CLASSIC’ AND category=’ROCK’
- D、SELECT * FROM cd WHERE category=’CLASSIC’ OR category=’ROCK’
相关考题:
有SQL语句: SELECT*FROM教师WHERENOT(工资>30000R工资<2000)与如上语句等价的SQL语句是A.SELECT*FROM 教师 WHERE 工资 BETWEEN 2000 AND 3000B.SELECT*FROM 教师 WHERE 工资>2000 AND工资<3000C.SELECT*FROM 教师 WHERE 工资>2000 OR工资<3000D.SELECT*FROM 教师 WHERE 工资<=2000 AND工资>3000
有下列SQLSELECT语句:SELECT*FROM 工资表 WHERE 基本工资=1000下列与该语句 有下列SQLSELECT语句:SELECT*FROM 工资表 WHERE 基本工资<=3000 AND 基本工资>=1000下列与该语句等价的是( )。A.SELECT*FROM工资表WHERE基本工资BETWEEN 1000 AND 3000B.SELECT*FROM工资表WHERE基本工资BETWEEN 3000 AND 1000C.SELECT*FROM工资表WHERE基本工资FROM 1000 INTO 3000D.SELECT*FROM工资表WHERE基本工资FROM 3000 INTO 1000
有如下SQL-SELECT语句SELECT * FROM HH WHERE 单价 BETWEEN 10.6 AND 13.4与该语句等价的是A.SELECT * FROM HH WHERE 单价=13.4 AND 单价=10.6B.SELECT * FROM HH WHERE 单价13.4 AND 单价10.6C.SELECT * FROM HH WHERE 单价=13.4 AND 单价=10.6D.SELECT * FROM HH WHERE 单价13.4 AND 单价10.6
根据SQL标准,要查询表student中所有年龄age小于所有学生的平均年龄的记录,下面哪条语句适用?()A select * from student where ageB select * from student having ageC select * from student a where a.ageD select * from student a where (select avg(b.age) from student b ) >= a.age
下列SELECT语句正确的是______。A.SELECT*FROM'学生表'WHERE姓名=张三B.SELECT*FROM'学生表'WHERE姓名=张三C.SELECT*FROM学生表WHERE姓名=张三D.SELECT*FROM学生表WHERE姓名=张三
有SQL语句:SELECT * FROM 教师 WHERE NOT(工资3000 OR 工资2000)与如下语句等价的SQL语句是A)SELECT*FROM 教师 WHERE 工资 BETWEEN 2000 AND 3000B) SELECT*FROM 教师 WHERE 工资2000 AND 工资3000C)SELECT*FROM 教师 WHERE 工资2000 OR 工资3000D) SELECT*FROM 教师 WHERE 工资=2000 AND 工资3000
有如下SQL SELECT 语句SELECT * FROM stock WHERE 单价 BETWEEN 12.76 AND 15.20与该语句等价的是A) SELECT * FROM stock WHERE 单价=15.20.AND.单价=12.76B) SELECT * FROM stock WHERE 单价15.20.AND.单价12.76C) SELECT * FROM stock WHERE 单价=15.20.AND.单价=12.76D) SELECT * FROM stock WHERE 单价15.20.AND.单价12.76
在学生表中查找没有选课的学生,下列语句正确的是( )。A.SELECT*FROM 学生 WHERE EXISTS; (SELECT*FROM 选课 WHERE学生号=学生.学生号)B.SELECT*FROM 学生 WHERE NOT EXISTS; (SELECT*FROM 选课 WHERE 学生号=学生.学生号)C.SELECT*FROM 学生 WHERE EXISTS; (SELECT*FROM 选课 WHERE 学生号=学生号)D. SELECT*FROM 学生 WHERE NOT EXISTS; (SELECT*FROM 选课 WHERE 学生号=学生号)
使用如下数据袁:仓库表(仓库号,所在城市) 职工表(职工号,仓库号,工资) 其中,仓库号、所在城市和职工号字段为字符型,工资字段为数值型。 有如下SQL SELECT语句: SELECT*FORM职工表WHERE工资=2000 AND工资=1500 下列与该语句等价的是( )。A. SELECT*FROM职工表WHERE工资BETWEEN l500 AND 2000B. SELECT*FROM职工表WHERE工资BETWEEN 2000 AND l500C. SELECT*FROM职工表WHERE工资FROM l500 INT0 2000D. SELECT*FROM职工表WHERE工资FROM 2000 INT0 1500
设有购买表(顾客号,商品号,购买时间)。现要查询顾客A与顾客B购买的相同商品。有下列查询语句:Ⅰ.SELECT商品号FROM购买表WHERE顾客号=ˊAˊAND商品号IN(SELECT商品号FROM购买表WHERE顾客号=ˊBˊ)Ⅱ.SELECT商品号FROM购买表WHERE顾客号=ˊA ˊEXCEPTSELECT商品号FROM购买表WHERE顾客号=ˊBˊⅢ.SELECT商品号FROM购买表WHERE顾客号=ˊAˊINTERSECTSELECT商品号FROM购买表WHERE顾客号=ˊBˊⅣ.SELECT商品号FROM购买表WHERE顾客号=ˊA ˊUNl0NSELECT商品号FROM购买表WHERE顾客号=ˊB ˊ上述语句中,能够实现该查询要求的是( )。A.仅Ⅰ和ⅡB.仅Ⅰ和ⅢC.仅Ⅰ和ⅣD.仅Ⅲ
有如下SQL语句: SELECT姓名FROM学生表WHERE学号IN; (SELECT学号FROM成绩表WHERE成绩>90) 下列哪条命令与该SQL语句等价A.SELECT姓名FROM学生表WHERE EXISTS; (SELECT学号FROM成绩表WHERE成绩>90)B.SELECT姓名FROM学生表WHERE EXISTS; (SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)C.SELECT姓名FROM学生表WHERE学号EXISTS; (SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)D. SELECT姓名FROM学生表WHERE学号=; (SELECT学号FROM成绩表WHERE成绩>90)
有SQL语句 SELECT * FROM 教师 WHERE NOT(工资>30000R工资<2000) 与如上语句等价的SQL语句是A.SELECT * FROM 教师 WHERE 工资 BETWEEN 2000 AND 3000B.SELECT * FROM 教师 WHERE 工资>2000 AND工资<3000C.SELECT * FROM 教师 WHERE 工资>2000 OR工资<3000D.SELECT * FROM 教师 WHERE 工资<=2000 AND工资>=3000
有SQL语句: SELECT DISTINCT 系号 FROM 教师 WHERE 工资>=; ALL(SELECT 工资 FROM 教师 WHERE 系号 =“02”) 与如上语句等价的SQL语句是A.SELECT DISTINCT 系号 PROM 教师 WHERE 工资>=; (SELECT MAX(工资)FROM 教师 WHERE 系号=“02”)B.SELECT DISTINCT 系号 FROM 教师 WHERE 工资=; (SELECT MIN(工资)FROM 教师 WHERE 系号=“02”)C.SELECT DISTINCT 系号 FROM 教师 WHERE 工资>=; ANY(SELECT 工资 FROM 教师 WHERE 系号=“02”)D.SELECT DISTINCT 系号 FROM 教师 WHERE 工资>=; SOME(SELECT 工资 FROM 教师 WHERE 系号=“02”)
设ABC表的A列存储电话号码信息,则查询不是以7开头的所有电话号码的查询语句是( ) A select A from ABC where A is not ‘%7’B select A from ABC where A like ‘%7%’C select A from ABC where A not like ‘7%’D select A from ABC where A like ‘[1-6]%’
有下列SQL SELECT语句:SELECT*FROM 工资表 WHERE 基本工资=1000下列与该语 有下列SQL SELECT语句: SELECT*FROM 工资表 WHERE 基本工资<=3000 AND 基本工资>=1000 下列与该语句等价的是( )。A.SELECT*FROM 工资表 WHERE 基本工资 BETWEEN 1000 AND 3000B.SELECT*FROM 工资表 WHERE 基本工资 BETWEEN 3000 AND 1000C.SELECT*FROM 工资表 WHERE 基本工资 FROM 1000 INTO 3000D.SELECT*FROM 工资表 WHERE 基本工资 FROM 3000 INTO 1000
利用SQL语句,检索仓库中至少有一名职工的仓库信息,正确的命令是A.SELECT * FROM 仓库表 WHERE IN; (SELECT 仓库号 FROM 职工表)B.SELECT * FROM 仓库表 WHERE NOT IN; (SELECT 仓库号 FROM 职工表)C.SELECT * FROM 仓库表 WHERE 仓库号 EXISTS; (SELECT * FROM 职工表 WHERE 仓库号=仓库表.仓库号)D.SELECT * FROM 仓库表 WHERE EXISTS; (SELECT * FROM 职工表 WHERE 仓库号=仓库表.仓库号)
有SQL语句:SELECT DISTINCT系号FROM教师WHERE 工资=ALL (SELECT 工资FROM教师WHERE系号=\02\) 与如上语句等价的SQL语句是A.SELECT DISTINCT系号FROM教师WHERE工资=(SELECT MAX(工资)FROM教师WHERE 系号="02")B.SELECT DISTINCT系号FROM教师WHERE工资=(SELECT MIN(工资)FROM教师WHERE 系号="02")C.SELECT DISTINCT系号FROM教师WHERE工资=(ANY(SELECT(工资)FROM教师WHERE 系号="02")D.SELECT DISTINCT系号FROM教师WHERE工资=(SOME (SELECT(工资)FROM教师WHERE 系号="02")
查询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
下列SQL语句中,能够对查询结果进行排序的是()A、SELECT * FROM 学生表 WHERE 专业=‘软件’ORDER BY 年龄B、SELECT * FROM 学生表 WHERE 专业=‘软件’C、SELECT * FROM 学生表 WHERE 专业=‘软件’AVG 年龄D、SELECT * FROM 学生表 WHERE 专业=‘软件’DISTINCT 年龄
下列SQL语句中,能够完成对查询结构排序的是()。A、SELECT *FROM 学生 WHERE 专业=’软件’ ORDER BY 年龄B、SELECT *FROM 学生表 WHERE 专业=‘软件’C、SELECT *FROM 学生表 WHERE 专业=‘软件’ WHERE 专业= ‘软件AVG 年龄D、SELECT *FROM 学生表 WHERE 专业=‘软件’ DISTINCT 年龄 11
数据库中有一张表名称为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’男’
查询book表中所有书名中包含“计算机”的书籍情况,可用()语句。A、SELECT*FROM book WHERE book_nameLIKE‘*计算机*’B、SELECT*FROM book WHERE book_nameLIKE‘%计算机%’C、SELECT*FROM book WHERE book_name=‘%计算机*’D、SELECT*FROM book WHERE book_name=‘*计算机%’
有如下SQL语句:下列哪条命令与该SQL语句等价() SELECT姓名FROM学生表WHERE学号IN; (SELECT学号FROM成绩表WHERE成绩>90)A、SELECT姓名FROM学生表WHEREEXISTS;(SELECT学号FROM成绩表WHERE成绩>90)B、SELECT姓名FROM学生表WHEREEXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)C、SELECT姓名FROM学生表WHERE学号EXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)D、SELECT姓名FROM学生表WHERE学号=;(SELECT学号FROM成绩表WHERE成绩>90)
从“员工”表的“姓名”字段中找出名字包含“玛丽”的人,下面哪条select语句正确()。A、Select * from 员工 where 姓名 =’_玛丽_’B、Select * from 员工 where 姓名 =’%玛丽_’C、Select * from 员工 where 姓名 like ‘_玛丽%’D、Select * from 员工 where 姓名 like ‘%玛丽%’
查询student表中的所有非空email信息,以下语句正确的是()A、Select email from student where email!=nullB、Select email from student where emailnotisnullC、Select email from student where emailnullD、Select email from student where emailisnotnull
下列哪些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 ’%张三%’
单选题有如下SQL语句:下列哪条命令与该SQL语句等价() SELECT姓名FROM学生表WHERE学号IN; (SELECT学号FROM成绩表WHERE成绩>90)ASELECT姓名FROM学生表WHEREEXISTS;(SELECT学号FROM成绩表WHERE成绩>90)BSELECT姓名FROM学生表WHEREEXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)CSELECT姓名FROM学生表WHERE学号EXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)DSELECT姓名FROM学生表WHERE学号=;(SELECT学号FROM成绩表WHERE成绩>90)