November 29, 2009

MySQL語法練習

(1)請查詢出貨運公司編號為1,2的貨運公司名稱,電話(資料表:Shippers)

SELECT CompanyName AS 貨運公司名稱, Phone AS 電話
FROM Shippers
WHERE ShipperID between 1 and 2;


(2)請查詢出訂單(資料表: Orders)的客戶編號(由大至小排序),限制條件為
已知貨運名稱為‘United Package‘,’Federal Shipping’ (資料表:Shippers)且
送貨日期範圍為‘2002/11/9’至‘2002/11/16‘ 且
處理此訂單的員工編號為1,6,9

SELECT CustomerID AS 客戶編號
FROM Orders
WHERE CustomerID IN
(SELECT CustomerID
FROM Shippers
WHERE CompanyName='United Package' or CompanyName='Federal Shipping')
AND ShippedDate between CDate('2002/11/9') and CDate('2002/11/16')
AND EmployeeID IN (1,6,9)
ORDER BY CustomerID DESC;


(3)請查詢出產別類別(資料表: Categories)說明有’Pasta’的類別名稱

SELECT Description AS 類別名稱
FROM Categories
WHERE Description like '*Pasta*';

由 b101098135 發表於 November 29, 2009 09:43 PM
迴響

We are the Canada's largest provider of social media fans on platforms like Facebook, Twitter, You tube and Instagram. 100% Money-Back guarantee. Why Buy

Posted by: buy instagram followers buzzoid review 發表於 October 6, 2016 09:13 PM
發表迴響









記住我的資訊?





請依上圖輸入檢核碼: