示例6-6

 SELECT  bookid,bookName,Price,Author,PublishDate 
FROM  BookInfo 
WHERE Price <45
ORDER BY PublishDate 

示例6-7
 SELECT TOP 5 * 
FROM  SalesDetails
ORDER BY Quantity  DESC

示例6-9
SELECT top 7 bookName 书名, price 原价, 0.8 折扣,Price*0.8 折后价 
FROM BookInfo

示例6-10
SELECT BookName,Author,PublishDate   FROM BookInfo 
WHERE BookName LIKE '%数据库%'

示例6-11
SELECT BookName ,Author    FROM BookInfo 
WHERE Author LIKE '刘%'

示例6-12
 SELECT BookName ,Author ,PublishDate,Price    FROM BookInfo 
WHERE YEAR(PublishDate) BETWEEN  '2005' AND '2006'
ORDER BY PublishDate DESC ,Price ASC

示例6-13
SELECT BookName,Author ,Price   FROM BookInfo 
WHERE Price NOT BETWEEN 20 AND 50
ORDER BY Price DESC

示例6-14
SELECT BookID,Content FROM BookInfo 
WHERE BookID IN ('B0001','B0005','B0008')
