← All tables and views

Northwind view

Customer and Suppliers by City

Native view in the Northwind sample database.

122rows

4 columns

Schema from the provider contract
ColumnTypeNullableKeyReferences
CityTEXTyes——
CompanyNameTEXTyes——
ContactNameTEXTyes——
RelationshipTEXTyes——

View definition

CREATE VIEW [Customer and Suppliers by City] 
AS
SELECT City, 
       CompanyName, 
       ContactName, 
       'Customers' AS Relationship 
FROM Customers
UNION 
SELECT City, 
       CompanyName, 
       ContactName, 
       'Suppliers'
FROM Suppliers 
ORDER BY City, CompanyName

Data preview

Sample records

122 rows available
CityCompanyNameContactNameRelationship
NULLITVal2Customers
NULLITValon HotiCustomers
AachenDrachenblut DelikatessenSven OttliebCustomers
AlbuquerqueRattlesnake Canyon GroceryPaula WilsonCustomers
AnchorageOld World DelicatessenRene PhillipsCustomers
Ann ArborGrandma Kelly's HomesteadRegina MurphySuppliers
AnnecyGai pâturageEliane NozSuppliers
BarcelonaGalería del gastrónomoEduardo SaavedraCustomers