NorthWind 資料庫,northwind資料庫

來源:互聯網
上載者:User

NorthWind 資料庫,northwind資料庫
NorthWind 資料庫

  • Categories:產品類別;
  • Customers:客戶;
  • Employees:僱員
  • Employees Territories:員工涉及領域
  • Order Details:訂單明細
  • Orders:訂單
  • Products:產品
  • Region:地區
  • Shippers:運貨商
  • Suppliers:供應商
  • Territories:地區
        在NorthWind資料庫中建立關係圖:
        下面進行幾次查詢瞭解資料內容:
select productid,productname,unitprice from Productswhere UnitPrice>49
查詢結果:
select productid,productname,UnitsInStock,UnitsOnOrder from Products where UnitsInStock<UnitsOnOrder
查詢結果:
select * from Productswhere ProductName='Aniseed Syrup' or ProductName='Ipoh Coffee'
select * from Productswhere ProductName in('Aniseed Syrup','Ipoh Coffee')
查詢結果:

select * from Productswhere SupplierID=CategoryID
查詢結果:
select SupplierID,CompanyName,Phone,Fax from Supplierswhere Phone is not null and fax is null

select * from Suppliersorder by City  desc

select SupplierID,CompanyName,Country from Supplierswhere Country in('USA','UK','Germany')

select SupplierID,CompanyName,ContactTitle,Phone from Supplierswhere  ContactTitle='Marketing Manager' and Phone is not null

select distinct ShipVia from Orders

select distinct ShipCity from Orders

select OrderID,ShippedDate,RequiredDate from Orderswhere ShippedDate>RequiredDate

select OrderID,CustomerID,Freight from Orderswhere Freight<55

select * from Categorieswhere CategoryName like '_e%'

select * from Categorieswhere Description like '%sweet%'


northwind資料庫

1:進入微軟官方網站www.microsoft.com/

2:點擊網頁右側Download & Trias然後選擇Download Center進入下載中心

3:在網頁上找到Microsoft SQL Server 2000 點擊進入

4:選擇NorthWind and pubs Sample Databases for SQL Server 2000 點擊進入

5:點Download按鈕開始下載

6:獲得SQL2000SampleDb.msi檔案,雙擊

7:進入C:\SQL Server 2000 Sample Databases會有連個sql指令碼instwnd.sql和instpubs.sql

8:在SQLServer2005中運行這兩個指令碼即可
 
Northwind資料庫的背景是什,最好把具體每一個表,欄位都解釋一下?

如果你安裝的是中文的office2000或者是更高的版本,你可以要求安裝Microsoft access自己附帶的樣本資料庫,這個其中就有你要的Northwind資料庫,其中每一個資料表都有中文的名稱,每一個field都有中文的名字,你可以去看看,一看你就會明白的。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.