首页 > 代码库 > NorthWind 数据库
NorthWind 数据库
NorthWind 数据库
- Categories:产品类别;
- Customers:客户;
- Employees:雇员
- Employees Territories:员工涉及领域
- Order Details:订单明细
- Orders:订单
- Products:产品
- Region:地区
- Shippers:运货商
- Suppliers:供应商
- Territories:地域
在NorthWind数据库中创建关系图:
下面进行几次查询了解数据内容:
select productid,productname,unitprice from Products where UnitPrice>49
查询结果:
select productid,productname,UnitsInStock,UnitsOnOrder from Products where UnitsInStock<UnitsOnOrder查询结果:
select * from Products where ProductName='Aniseed Syrup' or ProductName='Ipoh Coffee'
select * from Products where ProductName in('Aniseed Syrup','Ipoh Coffee')查询结果:
select * from Products where SupplierID=CategoryID查询结果:
select SupplierID,CompanyName,Phone,Fax from Suppliers where Phone is not null and fax is null
select * from Suppliers order by City desc
select SupplierID,CompanyName,Country from Suppliers where Country in('USA','UK','Germany')
select SupplierID,CompanyName,ContactTitle,Phone from Suppliers where ContactTitle='Marketing Manager' and Phone is not null
select distinct ShipVia from Orders
select distinct ShipCity from Orders
select OrderID,ShippedDate,RequiredDate from Orders where ShippedDate>RequiredDate
select OrderID,CustomerID,Freight from Orders where Freight<55
select * from Categories where CategoryName like '_e%'
select * from Categories where Description like '%sweet%'
NorthWind 数据库
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。