NorthWind 数据库

NorthWind 数据库

NorthWind 数据库
  • Categories:产品类别;
  • Customers:客户;
  • Employees:雇员
  • Employees Territories:员工涉及领域
  • Order Details:订单明细
  • Orders:订单
  • Products:产品
  • Region:地区
  • Shippers:运货商
  • Suppliers:供应商
  • Territories:地域
        在NorthWind数据库中创建关系图:
NorthWind 数据库
        下面进行几次查询了解数据内容:
select productid,productname,unitprice from Products
where UnitPrice>49
查询结果:
NorthWind 数据库
select productid,productname,UnitsInStock,UnitsOnOrder
 from Products where UnitsInStock<UnitsOnOrder
查询结果:
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<55
NorthWind 数据库
select * from Categories
where CategoryName like '_e%'
NorthWind 数据库
select * from Categories
where Description like '%sweet%'
NorthWind 数据库

NorthWind 数据库

上一篇:阿里云mysql5.5安装


下一篇:如何在JSP页面显示mysql数据库内容 (二)