要查询book表中所有书名以“电子商务”开头的书籍作者,可用______语句。A.SELECT author FROM book WHERE book_name='电子商务*'B.SELECT author FROM book WHERE book_name LIKE'电子商务*'C.SELECT author FROM book WHERE book_name='电子商务%'D.SELECT author FROM book WHERE book_name LIKE'电子商务%'
要查询book表中所有书名以“电子商务”开头的书籍作者,可用______语句。
A.SELECT author FROM book WHERE book_name='电子商务*'
B.SELECT author FROM book WHERE book_name LIKE'电子商务*'
C.SELECT author FROM book WHERE book_name='电子商务%'
D.SELECT author FROM book WHERE book_name LIKE'电子商务%'
B.SELECT author FROM book WHERE book_name LIKE'电子商务*'
C.SELECT author FROM book WHERE book_name='电子商务%'
D.SELECT author FROM book WHERE book_name LIKE'电子商务%'
参考解析
解析:在SQL数据查询中,关键字LIKE可以用来进行字符串的匹配,其一般语法格式如下。[NOT] LIKE '<匹配串>'[ESCAPE'<换码字符>']其含义是查找指定的属性列值与<匹配串>相匹配的元组。<匹配串>可以是一个完整的字符串,也可以含有通配符“%”和“_”。其中:“%”(百分号)代表任意长度(长度可以为0)的字符串;“_”(下划线)代表任意单个字符。要查询book表中所有书名以“电子商务”开头的书籍作者,可使用的SQL语句如下。SELECT authorFROM bookWHERE book_name LIKE '电子商务%'
相关考题:
若要求查找‘李’姓学生的学生号和姓名,正确的SQL语句是A.SELECT S#,SNAME FROM S WHERE SNAME='李%.'B.SELECT S#,SNAME FROM S WHERE SNAME LIKE '李%.'C.SELECT S#,SNAME FROM S WHERE SNAME='%.李%.'D.SELECT S#,SNAME FROM S WHERE SNAME LIKE '%.李%.'
“从学生关系S中检索姓′王′的学生学号”的SQL语句是A.SELECT sno FROM sc WHERE sname=′王′B.SELECT sno FROM sc WHERE sname IS LIKE′王%′C.SELECT sno FROM sc WHERE sname LIKE′王%′D.SELECT sno FROM sc WHERE sname LIKE′王_′
下列语句错误的是( )A.select * from orders where ordername is not null;B.select * from orders where ordername<>null;C.select * from orders where ordername is null;D.select * from orders where ordername not is null;
要查询INFORMATION表中姓“王”且日£名的学生情况。可以用下列哪个命令?…A.SELECT*FROM INFORMATION WHERE姓名=‘王--’B.SELECT*FROM INFORMATION WHERE姓名LIKE‘王%’C.SELECT*FROM INFORMATION WHERE姓名=‘王%’D.SELECT*FROM INFORMATION WHERE姓名LIKE‘王_’
哪些是正确的 like 运算表达式?A.select * from net_46 where s_name like ’晓’B.select * from net_46 where s_name like ’&晓&’C.select * from net_46 where s_name like ’$晓$’D.select * from net_46 where s_name like ’%晓%’
若用表Reader存储读者信息,Book表存储图书信息,Borrow表存储借阅情况。以下SQL语句是“查询证号为12345的读者当前所借阅的图书书名(即尚未归还的图书)”,请补充完整。SELECT 书名 FROM Book WHERE 流水号(1)(SELECT 流水号 FROM(2)WHERE 证号="12345" AND(3))以下SQL语句是“查询书名包含‘软件设计师’的图书情况”,请补充完整。SELECT * FROM Book WHERE 书名(4)"%软件设计师%"
在学生表STUD中查询所有姓张的学生的信息,使用的SQL语句是______。A.SELECT * FROM STUD WHERE 姓名LIKE“张%”B.SELECT * FROM STUD WHERE 姓名IN(“张%”)C.SELECT * FROM STUD WHERE 姓名LIKE“张$”D.SELECT * FROM STUD WHERE 姓名IN(“张$)”
在下列查询语句中,与 SELECTTAB1.*FROM TABl WHERE InStr([简历],"篮球")<>0 功能相同的语句是______。A.SELECT TAB1.*FROM TAB1 WHERE TAB1.简历Like "篮球"B.SELECT TAB1.*FROM TAB1 WHERE TAB1.简历Like "*篮球"C.SELECT TAB1.*FROM TAB1 WHERE TAB1.简历Like "*篮球*"D.SELECT TAB1.*FROM TAB1 WHERE TAB1.简历Like "篮球*"
下列SELECT语句正确的是______。A.SELECT*FROM'学生表'WHERE姓名=张三B.SELECT*FROM'学生表'WHERE姓名=张三C.SELECT*FROM学生表WHERE姓名=张三D.SELECT*FROM学生表WHERE姓名=张三
查询客户名称中有“网络”二字的客户信息的正确命令是( )。A.SELECT*FROM 客户 FOR 名称 LIKE "%网络%"B.SELECT*FROM 客户 FOR 名称 = "%网络%"C.SELECT*FROM 客户 WHERE 名称 = "%网络%"D.SELECT*FROM 客户 WHERE 名称 LIKE "%网络%"
查询单位名称中含“北京”字样的所有读者的借书证号和姓名,正确的SQL语句是A.SELECT借书证号,姓名FROM读者WHERE单位=“北京%”B.SELECT借书证号,姓名FROM读者WHERE单位=“北京*”C.SELECT借书证号,姓名FROM读者WHERE单位LIKE“北京*”D.SELECT借书证号,姓名FROM读者WHERE单位LIKE“%北京%”
查询“教师”表中“住址”字段中含有“望京”字样的教师信息,正确的SQL语句是( )。A.SELECT*FROM教师WHERE住址LIKE"%望京%"B.SELECT*FROM教师FOR住址LIKE"%望京%"C.SELECT*FROM教师FOR住址="%望京%"D.SELECT*FROM教师WHERE地址="%望京%"
若要在职工表中查找姓名中最后一个字是“静”的职工记录,应该使用的命令是 ( )。A.SELECT*FROM 职工 WHERE 姓名 LIKE “?静”B.SELECT*FROM 职工 WHERE 姓名 LIKE “*静”C.SELECT*FROM 职工 WHERE 姓名 LIKE “!静”D.SELECT*FROM 职工 WHERE 姓名 LIKE “-静”
“从学生选课信息表中找出无成绩的元组”的SQL语句是( )。 A.SELECT*FROM sc WHERE grade=NULL B.SELECT*FROM sc WHERE grade IS'' C.SELECT*FROM sc WHERE grade IS NULL D.SELECT*FROM sc WHERE grade=''
talbe :pub(pub_code char(2),pub_name varchar2(32))book(book_code char(8),book_name varhcar2(128),pub_code char92),author_codechar(4),book_mem varchar2(128))author(author_code char(4),author_name varchar2(10),sex char(1), agenumber(3),dir varchar2(64))auth_list(auth_date date,author_code char(4))在PL/SQL中有以下两种字义v_book_row book%rowtype;v_book_code book.bank_code%type;请说明v_book_row,v_book_code变量的含义以及数据类型
在下列查询语句中,与SELECT TABl*FROM,TABl WHERE InStr([简历],”篮球”)o功能相同的语句是( )。A.SELECT TABl.*FROM TABl WHERE TABl.简历Like”篮球”B.SELECT TABl.*FROM TABl WHERE TABl.简历Like”*篮球”C.SELECT TABl.*FROM TABl WHERE TABl.简历Like”*篮球*”D.SELECT TABl.*FROM TABl WHERE TABl.简历Like”篮球*”
列出“学生”表中专业为“电子商务”和“国际贸易”的学生信息应使用的SQL查询语句是______。A.SELKCT * FROM 学生 WHERE 专业=“电子商务”; AND SELECT * FROM 学生 WHERE专业=“国际贸易”B.SELECT * FROM 学生 WHERE专业=“电子商务”; UNION WHERE 专业=“国际贸易”C.SELECT * FROM 学生 WHERE专业=“电子商务”; UNION SELECT*FROM 学生 WHERE专业=“国际贸易”D.SELECT*FROM学生 WHERE 专业=“电子商务”; IN SELECT*FROM学生GROUP BY专业=“国际贸易”
使用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学生WHERE专业="电子商务"; AND SELECT*FROM 学生 WHERE专业="国际贸易"B.SELECT*FROM 学生 WHERE =专业="电子商务"; UNION WHERE专业:”国际贸易”C.SELBCT*FROM 学生 WHERE 专业="电子商务"; UNION SELECT*FROM 学生 WHERE 专业="国际贸易"D.SELECT*FROM学生WHERE专业="电子商务";IN SELECT*FROM 学生 GROUP BY专业="国际贸易"
对于学生信息表: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'刘'
要查询book表中所有书名以“电子商务”开头的书籍作者,可用(61)语句。A.SELECT author FROM booK WHERE book _name=‘电子商务*’B.SELECT author FROM booK WHERE book _name LIKE‘电子商务*’C.SELECT author FROM booK WHERE book_ name=‘电子商务%’D.SELECT author FROM booK WHERE book_name LIKE‘电子商务%’
下列选项中列出的所有关键字全部属于标准SQL语言的是()。A.SELECT、IN、WHERE、COUNTE;B.SELECT、FROM、WHERE、ORDRE;C.SELECT、FORM、WHERE、GROUPBY;D.SELECT、FROM、LIKE、IN
查询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=‘*计算机%’
要查询book表中所有书名中以“计算机”开头的书籍的价格,可用()语句。A、SELECT price FROM book WHERE book_name=‘计算机*’B、SELECT price FROM book WHERE book_nameLIKE‘计算机*’C、SELECT price FROM book WHERE book_name=‘计算机%’D、SELECT price FROM book WHERE book_nameLIKE‘计算机%’
现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()A、select top 1 * from book order by price ascB、select top 1 * from book order by price descC、select top 1 * from book where price= (select max (price)from book)D、select top 1 * from book where price= max(price)
如果要查询book表中所有书名以“数据库”开头的书籍价格,下列()语句是正确的。A、SELECT price FROM book WHERE book_name=“数据库*”B、SELECT price FROM book WHERE book_name LIKE“数据库*”C、SELECT price FROM book WHERE book_name=“数据库%”D、SELECT price FROM book WHERE book_name LIKE“数据库%”
单选题现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()。Aselect top1*from book order by price ascBselect top1*from book order by price descCselect top1*from book where priceDselect top1*from book where price=max(price)