BookStore数据库中有图书表Book(BookCode, BookName, Author, PublisherCode, PublishTime,BookSort, ISBN, BookPicture, ContentInro, Price, Discount),其中 PublishTime是datetime类型。 查询Book表中的图书类别(BookSort),要求每个类别只显示一次。SQL语句: SELECT _________ BookSort FROM BookA.DISTINCTB.ONLYC.ONED.PERCENT

BookStore数据库中有图书表Book(BookCode, BookName, Author, PublisherCode, PublishTime,BookSort, ISBN, BookPicture, ContentInro, Price, Discount),其中 PublishTime是datetime类型。 查询Book表中的图书类别(BookSort),要求每个类别只显示一次。SQL语句: SELECT _________ BookSort FROM Book

A.DISTINCT

B.ONLY

C.ONE

D.PERCENT


参考答案和解析
Price=Price*0.9,Discount=0.8;Price=Price*(1-10%),Discount=0.8;Discount=0.8,Price=Price*0.9

相关考题:

若用表Reader存储读者信息,Book表存储图书信息,Borrow表存储借阅情况。以下SQL语句是“查询证号为12345的读者当前所借阅的图书书名(即尚未归还的图书)”,请补充完整。SELECT 书名 FROM Book WHERE 流水号(1)(SELECT 流水号 FROM(2)WHERE 证号="12345" AND(3))以下SQL语句是“查询书名包含‘软件设计师’的图书情况”,请补充完整。SELECT * FROM Book WHERE 书名(4)"%软件设计师%"

在SQL Server 2000中,某数据库中有图书表(书号, 图书名称, 类别)和销售表(书号, 销售时间, 销售数量),其中销售数量大于0。现要查询2009年10月销售的图书名称和类别。请补全下列实现该功能的查询语句。SELECT图书名称, 类别FROM图书表WHERE EXISTS(SELECT*FROM销售表WHERE销售时间BETWEEN '2009/10/1' AND '2009/10/31'______)

● 已知关系模式:图书(图书编号,图书类型,图书名称,作者,出版社,出版日期,ISBN),图书编号唯一识别一本图书。建立“计算机”类图书的视图Computer-BOOK,并要求进行修改、插入操作时保证该视图只有计算机类的图书。实现上述要求的SQL语句如下: CREATE (56)。 AS SELECT图书编号,图书名称,作者,出版社,出版日期 FROM图书 WHERE图书类型='计算机' with check option; A.TABLE Computer-BOOK B.VIEWComputer-BOOK C.Computer-BOOK TABLE D.Computer-BOOKVIEW

要查询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‘电子商务%’

BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTime查询作者名长度大于等于8的图书信息,显示书名(BookName)及作者(Author)。SQL语句:SELECTBookName,AuthorFROMBookWHERELenth(Author)=8

BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTime,PublishTime是datetime类型。查询Book表中的图书类别(BookSort),要求每个类别只显示一次。SQL语句:SELECT()BookSort FROM BookA、DISTINCTB、ONLYC、ONED、PERCENT

BookStore数据库中有销售明细表OrderDetail(OrderCode,BookCode,Amount)查询销售总量前20%的图书,并按总销量降序排列。SQL语句:SELECT TOP 20 PERCENT Bookcode As书号,SUM(Amount)As总销量ROMOrderDetail GROUP BY Book code ORDER BY()A、AmountDESCB、SUM(Amount)DESCC、COUNT(Amount)DESCD、ADD(Amount)DESC

BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。显示图书的最高价、最低价、平均价、最高价与最低价之间的差值。SQL语句:SELECTMAX(Price)As最高价,MIN(Price)As最低价,Str(AVG(Price),6,2)As平均价()As最高价与最低价的差值FromBookA、(MAX-MIN)PriceB、MAX(Price)-MIN(Price)C、(MAX-MIN)(Price)D、MAX:Price-MIN:Price

BookStore数据库中有客户评价表CustomerEvaluation(CustomerCode,VIPClass,Author,EvaluateDate),其中PublishTime是datetime类型。查询用户等级(VIPClass)为“A”的客户编号(CustomerCode)和评价时间(EvaluateDate),要求显示标题分别为“客户编号”和“评价时间”。SQL语句:SELECT Customer CodeAs客户编号,Evaluate DateAs评价时间FROM Customer Evaluation WHERE()A、VIPClass=‘A’B、VIPClass=”A”C、VIPClass=AD、VIPClass==A

BookStore数据库中有图书Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。查询2009年出版的少儿类图书,要求显示图书名称(BookName)、作者(Author)、出版时间(PublishTime)、价格(Price)和折扣(Discount),并且字段标题分别为图书名称、作者、内容简介、价格和折扣。SQL语句SELECTBookNameAs图书名称,AuthorAs作者,convert(char(10),PublishTime,120)As出版时间,PriceAs价格,DiscountAs折扣FROMBookWHEREBookSort=‘少儿’AND()A、PublishTime=2009B、YEAR(PublishTime)=2009C、PublishTime=‘2009-1-1‘ANDPublishTime‘2010-1-1’D、PublishTime=‘2009-1-1‘ANDPublishTime=‘2009-12-31‘

BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTime查询图书名称(BookName)含有“程序”的图书信息。SQL语句:SELECTBookCode,BookName,Author,Price,DiscountFROMBookWHEREName=“%程序%”

BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。将Book表中的所有“外语”类图书的价格降低10%,并将折扣均设为8折。SQL语句:UPDATEBookSET()WhereBookSort=‘外语‘。A、Price=Price*0.9,Discount=0.8B、Price=Price*(1-10%),Discount=0.8C、Price=0.9,Discount=0.8D、Discount=0.8,Price=Price*0.9

查询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,包含字段:价格price(float),类别type(char);现在查询各个类别的平均价格、类别名称,以下语句正确的是()。A、select avg(price),type from book group by typeB、select count(price),type from book group by priceC、select avg(price),type from book group by priceD、select count(price),type from book group by type

如果要查询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“数据库%”

关于SQL语句“SELECTAuthor,BookName,ID,ISBN,Price FROM book ORDER BY ID DESC”的说法错误的是()。A、该语句表示从表“book”中查询所有记录B、该语句显示的字段是“Author”、“BookName”、“ID”、“ISBN”和“Price”C、该语句对查询到的记录将根据ID按升序排列D、该语句中的“book”表示数据表

单选题BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTime,PublishTime是datetime类型。查询Book表中的图书类别(BookSort),要求每个类别只显示一次。SQL语句:SELECT()BookSort FROM BookADISTINCTBONLYCONEDPERCENT

判断题BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTime查询作者名长度大于等于8的图书信息,显示书名(BookName)及作者(Author)。SQL语句:SELECTBookName,AuthorFROMBookWHERELenth(Author)=8A对B错

多选题BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。将Book表中的所有“外语”类图书的价格降低10%,并将折扣均设为8折。SQL语句:UPDATEBookSET()WhereBookSort=‘外语‘。APrice=Price*0.9,Discount=0.8BPrice=Price*(1-10%),Discount=0.8CPrice=0.9,Discount=0.8DDiscount=0.8,Price=Price*0.9

判断题BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTime查询图书名称(BookName)含有“程序”的图书信息。SQL语句:SELECTBookCode,BookName,Author,Price,DiscountFROMBookWHEREName=“%程序%”A对B错

多选题现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()Aselect top 1 * from book order by price ascBselect top 1 * from book order by price descCselect top 1 * from book where price= (select max (price)from book)Dselect top 1 * from book where price= max(price)

单选题关于SQL语句“SELECTAuthor,BookName,ID,ISBN,Price FROM book ORDER BY ID DESC”的说法错误的是()。A该语句表示从表“book”中查询所有记录B该语句显示的字段是“Author”、“BookName”、“ID”、“ISBN”和“Price”C该语句对查询到的记录将根据ID按升序排列D该语句中的“book”表示数据表

单选题现有书目表book,包含字段:价格price(float),类别type(char);现在查询各个类别的平均价格、类别名称,以下语句正确的是()。Aselect avg(price),type from book group by typeBselect count(price),type from book group by priceCselect avg(price),type from book group by priceDselect count(price),type from book group by type

单选题如果要查询book表中所有书名以“数据库”开头的书籍价格,下列()语句是正确的。ASELECT price FROM book WHERE book_name=“数据库*”BSELECT price FROM book WHERE book_name LIKE“数据库*”CSELECT price FROM book WHERE book_name=“数据库%”DSELECT price FROM book WHERE book_name LIKE“数据库%”

单选题要查询book表中所有书名中以“计算机”开头的书籍的价格,可用()语句。ASELECT price FROM book WHERE book_name=‘计算机*’BSELECT price FROM book WHERE book_nameLIKE‘计算机*’CSELECT price FROM book WHERE book_name=‘计算机%’DSELECT price FROM book WHERE book_nameLIKE‘计算机%’

多选题BookStore数据库中有图书Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。查询2009年出版的少儿类图书,要求显示图书名称(BookName)、作者(Author)、出版时间(PublishTime)、价格(Price)和折扣(Discount),并且字段标题分别为图书名称、作者、内容简介、价格和折扣。SQL语句SELECTBookNameAs图书名称,AuthorAs作者,convert(char(10),PublishTime,120)As出版时间,PriceAs价格,DiscountAs折扣FROMBookWHEREBookSort=‘少儿’AND()APublishTime=2009BYEAR(PublishTime)=2009CPublishTime=‘2009-1-1‘ANDPublishTime‘2010-1-1’DPublishTime=‘2009-1-1‘ANDPublishTime=‘2009-12-31‘