Cursusomgeving Data-Docent
Home
Effectieve Business Intelligence
Data Gedreven Werken
Databases
SQL
SQL Query
Query *
SELECT table_schema as [schema naam], table_name as tabel, column_name as kolom, data_type, [CHARACTER_MAXIMUM_LENGTH] as veldlengte, is_nullable FROM INFORMATION_SCHEMA.columns WHERE table_schema = 'Northwind' ORDER BY 1,2, 4
Query is verplicht
Uitvoeren van SELECT queries voor het ophalen van data.
Selecteren uit tabellen
Selecteren uit views
Selecteren met joins etc
schema naam
tabel
kolom
data_type
veldlengte
is_nullable
Northwind
Alphabetical list of products
Discontinued
bit
NO
Northwind
Alphabetical list of products
ProductID
int
NO
Northwind
Alphabetical list of products
SupplierID
int
YES
Northwind
Alphabetical list of products
CategoryID
int
YES
Northwind
Alphabetical list of products
UnitPrice
money
YES
Northwind
Alphabetical list of products
ProductName
nvarchar
40
NO
Northwind
Alphabetical list of products
CategoryName
nvarchar
15
NO
Northwind
Alphabetical list of products
QuantityPerUnit
nvarchar
20
YES
Northwind
Alphabetical list of products
UnitsInStock
smallint
YES
Northwind
Alphabetical list of products
UnitsOnOrder
smallint
YES
Northwind
Alphabetical list of products
ReorderLevel
smallint
YES
Northwind
Categories
Picture
image
2147483647
YES
Northwind
Categories
CategoryID
int
NO
Northwind
Categories
Description
ntext
1073741823
YES
Northwind
Categories
CategoryName
nvarchar
15
NO
Northwind
Category Sales for 1997
CategorySales
money
YES
Northwind
Category Sales for 1997
CategoryName
nvarchar
15
NO
Northwind
Current Product List
ProductID
int
NO
Northwind
Current Product List
ProductName
nvarchar
40
NO
Northwind
Customer and Suppliers by City
City
nvarchar
15
YES
Northwind
Customer and Suppliers by City
CompanyName
nvarchar
40
NO
Northwind
Customer and Suppliers by City
ContactName
nvarchar
30
YES
Northwind
Customer and Suppliers by City
Relationship
varchar
9
NO
Northwind
CustomerCustomerDemo
CustomerID
nchar
5
NO
Northwind
CustomerCustomerDemo
CustomerTypeID
nchar
10
NO
Northwind
CustomerDemographics
CustomerTypeID
nchar
10
NO
Northwind
CustomerDemographics
CustomerDesc
ntext
1073741823
YES
Northwind
Customers
CustomerID
nchar
5
NO
Northwind
Customers
CompanyName
nvarchar
40
NO
Northwind
Customers
ContactName
nvarchar
30
YES
Northwind
Customers
ContactTitle
nvarchar
30
YES
Northwind
Customers
Address
nvarchar
60
YES
Northwind
Customers
City
nvarchar
15
YES
Northwind
Customers
Region
nvarchar
15
YES
Northwind
Customers
PostalCode
nvarchar
10
YES
Northwind
Customers
Country
nvarchar
15
YES
Northwind
Customers
Phone
nvarchar
24
YES
Northwind
Customers
Fax
nvarchar
24
YES
Northwind
Employees
BirthDate
datetime
YES
Northwind
Employees
HireDate
datetime
YES
Northwind
Employees
Photo
image
2147483647
YES
Northwind
Employees
ReportsTo
int
YES
Northwind
Employees
EmployeeID
int
NO
Northwind
Employees
Notes
ntext
1073741823
YES
Northwind
Employees
LastName
nvarchar
20
NO
Northwind
Employees
FirstName
nvarchar
10
NO
Northwind
Employees
Title
nvarchar
30
YES
Northwind
Employees
TitleOfCourtesy
nvarchar
25
YES
Northwind
Employees
PhotoPath
nvarchar
255
YES
Northwind
Employees
Address
nvarchar
60
YES
Northwind
Employees
City
nvarchar
15
YES
Northwind
Employees
Region
nvarchar
15
YES
Northwind
Employees
PostalCode
nvarchar
10
YES
Northwind
Employees
Country
nvarchar
15
YES
Northwind
Employees
HomePhone
nvarchar
24
YES
Northwind
Employees
Extension
nvarchar
4
YES
Northwind
EmployeeTerritories
EmployeeID
int
NO
Northwind
EmployeeTerritories
TerritoryID
nvarchar
20
NO
Northwind
Invoices
OrderDate
datetime
YES
Northwind
Invoices
RequiredDate
datetime
YES
Northwind
Invoices
ShippedDate
datetime
YES
Northwind
Invoices
ProductID
int
NO
Northwind
Invoices
OrderID
int
NO
Northwind
Invoices
UnitPrice
money
NO
Northwind
Invoices
ExtendedPrice
money
YES
Northwind
Invoices
Freight
money
YES
Northwind
Invoices
CustomerID
nchar
5
YES
Northwind
Invoices
CustomerName
nvarchar
40
NO
Northwind
Invoices
Address
nvarchar
60
YES
Northwind
Invoices
City
nvarchar
15
YES
Northwind
Invoices
Region
nvarchar
15
YES
Northwind
Invoices
PostalCode
nvarchar
10
YES
Northwind
Invoices
Country
nvarchar
15
YES
Northwind
Invoices
Salesperson
nvarchar
31
NO
Northwind
Invoices
ProductName
nvarchar
40
NO
Northwind
Invoices
ShipperName
nvarchar
40
NO
Northwind
Invoices
ShipName
nvarchar
40
YES
Northwind
Invoices
ShipAddress
nvarchar
60
YES
Northwind
Invoices
ShipCity
nvarchar
15
YES
Northwind
Invoices
ShipRegion
nvarchar
15
YES
Northwind
Invoices
ShipPostalCode
nvarchar
10
YES
Northwind
Invoices
ShipCountry
nvarchar
15
YES
Northwind
Invoices
Discount
real
NO
Northwind
Invoices
Quantity
smallint
NO
Northwind
Order Details
OrderID
int
NO
Northwind
Order Details
ProductID
int
NO
Northwind
Order Details
UnitPrice
money
NO
Northwind
Order Details
Discount
real
NO
Northwind
Order Details
Quantity
smallint
NO
Northwind
Order Details Extended
OrderID
int
NO
Northwind
Order Details Extended
ProductID
int
NO
Northwind
Order Details Extended
UnitPrice
money
NO
Northwind
Order Details Extended
ExtendedPrice
money
YES
Northwind
Order Details Extended
ProductName
nvarchar
40
NO
Northwind
Order Details Extended
Discount
real
NO
Northwind
Order Details Extended
Quantity
smallint
NO
Northwind
Order Subtotals
OrderID
int
NO
Northwind
Order Subtotals
Subtotal
money
YES
Northwind
Orders
OrderDate
datetime
YES
Northwind
Orders
RequiredDate
datetime
YES
Northwind
Orders
ShippedDate
datetime
YES
Northwind
Orders
ShipVia
int
YES
Northwind
Orders
OrderID
int
NO
Northwind
Orders
EmployeeID
int
YES
Northwind
Orders
Freight
money
YES
Northwind
Orders
CustomerID
nchar
5
YES
Northwind
Orders
ShipName
nvarchar
40
YES
Northwind
Orders
ShipAddress
nvarchar
60
YES
Northwind
Orders
ShipCity
nvarchar
15
YES
Northwind
Orders
ShipRegion
nvarchar
15
YES
Northwind
Orders
ShipPostalCode
nvarchar
10
YES
Northwind
Orders
ShipCountry
nvarchar
15
YES
Northwind
Orders Qry
OrderDate
datetime
YES
Northwind
Orders Qry
RequiredDate
datetime
YES
Northwind
Orders Qry
ShippedDate
datetime
YES
Northwind
Orders Qry
ShipVia
int
YES
Northwind
Orders Qry
OrderID
int
NO
Northwind
Orders Qry
EmployeeID
int
YES
Northwind
Orders Qry
Freight
money
YES
Northwind
Orders Qry
CustomerID
nchar
5
YES
Northwind
Orders Qry
ShipName
nvarchar
40
YES
Northwind
Orders Qry
ShipAddress
nvarchar
60
YES
Northwind
Orders Qry
ShipCity
nvarchar
15
YES
Northwind
Orders Qry
ShipRegion
nvarchar
15
YES
Northwind
Orders Qry
ShipPostalCode
nvarchar
10
YES
Northwind
Orders Qry
ShipCountry
nvarchar
15
YES
Northwind
Orders Qry
CompanyName
nvarchar
40
NO
Northwind
Orders Qry
Address
nvarchar
60
YES
Northwind
Orders Qry
City
nvarchar
15
YES
Northwind
Orders Qry
Region
nvarchar
15
YES
Northwind
Orders Qry
PostalCode
nvarchar
10
YES
Northwind
Orders Qry
Country
nvarchar
15
YES
Northwind
Product Sales for 1997
ProductSales
money
YES
Northwind
Product Sales for 1997
CategoryName
nvarchar
15
NO
Northwind
Product Sales for 1997
ProductName
nvarchar
40
NO
Northwind
Products
Discontinued
bit
NO
Northwind
Products
ProductID
int
NO
Northwind
Products
SupplierID
int
YES
Northwind
Products
CategoryID
int
YES
Northwind
Products
UnitPrice
money
YES
Northwind
Products
QuantityPerUnit
nvarchar
20
YES
Northwind
Products
ProductName
nvarchar
40
NO
Northwind
Products
UnitsInStock
smallint
YES
Northwind
Products
UnitsOnOrder
smallint
YES
Northwind
Products
ReorderLevel
smallint
YES
Northwind
Products Above Average Price
UnitPrice
money
YES
Northwind
Products Above Average Price
ProductName
nvarchar
40
NO
Northwind
Products by Category
Discontinued
bit
NO
Northwind
Products by Category
CategoryName
nvarchar
15
NO
Northwind
Products by Category
ProductName
nvarchar
40
NO
Northwind
Products by Category
QuantityPerUnit
nvarchar
20
YES
Northwind
Products by Category
UnitsInStock
smallint
YES
Northwind
Quarterly Orders
CustomerID
nchar
5
YES
Northwind
Quarterly Orders
CompanyName
nvarchar
40
YES
Northwind
Quarterly Orders
City
nvarchar
15
YES
Northwind
Quarterly Orders
Country
nvarchar
15
YES
Northwind
Region
RegionID
int
NO
Northwind
Region
RegionDescription
nchar
50
NO
Northwind
Sales by Category
CategoryID
int
NO
Northwind
Sales by Category
ProductSales
money
YES
Northwind
Sales by Category
CategoryName
nvarchar
15
NO
Northwind
Sales by Category
ProductName
nvarchar
40
NO
Northwind
Sales Totals by Amount
ShippedDate
datetime
YES
Northwind
Sales Totals by Amount
OrderID
int
NO
Northwind
Sales Totals by Amount
SaleAmount
money
YES
Northwind
Sales Totals by Amount
CompanyName
nvarchar
40
NO
Northwind
Shippers
ShipperID
int
NO
Northwind
Shippers
CompanyName
nvarchar
40
NO
Northwind
Shippers
Phone
nvarchar
24
YES
Northwind
Summary of Sales by Quarter
ShippedDate
datetime
YES
Northwind
Summary of Sales by Quarter
OrderID
int
NO
Northwind
Summary of Sales by Quarter
Subtotal
money
YES
Northwind
Summary of Sales by Year
ShippedDate
datetime
YES
Northwind
Summary of Sales by Year
OrderID
int
NO
Northwind
Summary of Sales by Year
Subtotal
money
YES
Northwind
Suppliers
SupplierID
int
NO
Northwind
Suppliers
HomePage
ntext
1073741823
YES
Northwind
Suppliers
CompanyName
nvarchar
40
NO
Northwind
Suppliers
ContactName
nvarchar
30
YES
Northwind
Suppliers
ContactTitle
nvarchar
30
YES
Northwind
Suppliers
Address
nvarchar
60
YES
Northwind
Suppliers
City
nvarchar
15
YES
Northwind
Suppliers
Region
nvarchar
15
YES
Northwind
Suppliers
PostalCode
nvarchar
10
YES
Northwind
Suppliers
Country
nvarchar
15
YES
Northwind
Suppliers
Phone
nvarchar
24
YES
Northwind
Suppliers
Fax
nvarchar
24
YES
Northwind
Territories
RegionID
int
NO
Northwind
Territories
TerritoryDescription
nchar
50
NO
Northwind
Territories
TerritoryID
nvarchar
20
NO
Log
Bewaar
Resultatenlog
Resultaat
in de tabel hieronder:
Rijen: 190
kolommen: 6
Bewaar opdracht
Email *