欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

NorthWind数据库

程序员文章站 2022-04-12 22:15:28
...

NorthWind 数据库 Categories:产品类别;Customers:客户;Employees:雇员Employees Territories:员工涉及领域Order Details:订单明细Orders:订单Products:产品Region:地区Shippers:运货商Suppliers:供应商TerritZ喎?http://www.2cto.com/kf/ware/vc/"

NorthWind 数据库

NorthWind数据库
Categories:产品类别;Customers:客户;Employees:雇员Employees Territories:员工涉及领域Order Details:订单明细Orders:订单Products:产品Region:地区Shippers:运货商Suppliers:供应商TerritZ喎?http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcmllc6O6tdjT8goKICAgICAgICDU2k5vcnRoV2luZMr9vt2/4tbQtLS9qLnYz7XNvKO6CjxpbWcgc3JjPQ=="http://www.2cto.com/uploadfile/Collfiles/20140909/2014090909090740.jpg" alt="\">
下面进行几次查询了解数据内容:
select productid,productname,unitprice from Products
where UnitPrice>49
查询结果: NorthWind数据库
select productid,productname,UnitsInStock,UnitsOnOrder
 from Products where UnitsInStock查询结果:
NorthWind数据库
select * from Products
where ProductName='Aniseed Syrup' or ProductName='Ipoh Coffee'
select * from Products
where ProductName in('Aniseed Syrup','Ipoh Coffee')
查询结果:
NorthWind数据库
select * from Products
where SupplierID=CategoryID
查询结果: NorthWind数据库
select SupplierID,CompanyName,Phone,Fax from Suppliers
where Phone is not null and fax is null
NorthWind数据库
select * from Suppliers
order by City  desc
NorthWind数据库
select SupplierID,CompanyName,Country from Suppliers
where Country in('USA','UK','Germany')
NorthWind数据库
select SupplierID,CompanyName,ContactTitle,Phone 
from Suppliers
where  ContactTitle='Marketing Manager' and Phone is not null
NorthWind数据库
select distinct ShipVia from Orders
NorthWind数据库
select distinct ShipCity from Orders
NorthWind数据库
select OrderID,ShippedDate,RequiredDate from Orders
where ShippedDate>RequiredDate
NorthWind数据库
select OrderID,CustomerID,Freight from Orders
where Freight
NorthWind数据库
select * from Categories
where CategoryName like '_e%'
NorthWind数据库
select * from Categories
where Description like '%sweet%'
NorthWind数据库