Table:
Northwind.dbo.Employees
Table Properties
| Name | Value |
| Owner | dbo |
| Creation Date | 12/13/2004 |
| ID | 1977058079 |
| Located On | PRIMARY |
| Data Size KB | 232 KB |
| Index Size KB | 48 KB |
| Rows | 9 |
Creation Options
| Name | Value |
| QUOTED_IDENTIFIER | ON |
| ANSI_NULLS | ON |
| ANSI_PADDING | ON |
Columns
Indexes
| Index | Primary | Unique | |
![]() |
PK_Employees | ![]() |
![]() |
![]() |
LastName | ![]() |
![]() |
![]() |
PostalCode | ![]() |
![]() |
Fulltext Index
Statistics
Check Constraints
| Name | Expression | |
![]() |
CK_Birthdate | ([BirthDate] < getdate()) |
Identity Column
| Name | Seed | Increment | Not for replication | |
![]() |
EmployeeID | 1 | 1 | ![]() |
Referencing Tables
| Table | Foreign Key | Primary Key or Unique Constraint | |
![]() |
Employees | FK_Employees_Employees | PK_Employees |
![]() |
EmployeeTerritories | FK_EmployeeTerritories_Employees | PK_Employees |
![]() |
Orders | FK_Orders_Employees | PK_Employees |
Referenced Tables
| Table | Primary Key or Unique Constraint | Foreign Key | |
![]() |
Employees | PK_Employees | FK_Employees_Employees |
Objects that depend on Employees
| Object Name | Object Type | Dep Level | |
![]() |
[Employee Sales by Country] | Procedure | 1 |
![]() |
EmployeeTerritories | Table | 1 |
![]() |
Invoices | View | 1 |
![]() |
Orders | Table | 1 |
![]() |
CustOrderHist | Procedure | 2 |
![]() |
CustOrdersOrders | Procedure | 2 |
![]() |
[Order Details] | Table | 2 |
![]() |
[Orders Qry] | View | 2 |
![]() |
[Product Sales for 1997] | View | 2 |
![]() |
[Quarterly Orders] | View | 2 |
![]() |
[Sales by Category] | View | 2 |
![]() |
[Sales by Year] | Procedure | 2 |
![]() |
[Sales Totals by Amount] | View | 2 |
![]() |
SalesByCategory | Procedure | 2 |
![]() |
[Summary of Sales by Quarter] | View | 2 |
![]() |
[Summary of Sales by Year] | View | 2 |
![]() |
[Category Sales for 1997] | View | 3 |
![]() |
CustOrdersDetail | Procedure | 3 |
![]() |
[Order Details Extended] | View | 3 |
![]() |
[Order Subtotals] | View | 3 |
Objects that Employees depends on
| Object Name | Object Type | Dep Level | |
![]() |
Employees | Table | 0 |
Column Level Dependencies
| Object Name | Column | Object Type | |
![]() |
Employees | EmployeeID | Table |
Graphical Dependencies
Extended Properties
Permissions
Table Options
| Name | Value |
| Pintable | OFF |
| Table lock on bulk load | OFF |
| Insert row lock | OFF |
| Text in row | 0 |
| Large value types out of row | 0 |
SQL
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Employees] ( [EmployeeID] int NOT NULL IDENTITY(1, 1), [LastName] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [FirstName] nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Title] nvarchar(30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [TitleOfCourtesy] nvarchar(25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [BirthDate] datetime NULL, [HireDate] datetime NULL, [Address] nvarchar(60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [City] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Region] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [PostalCode] nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Country] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [HomePhone] nvarchar(24) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Extension] nvarchar(4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Photo] image NULL, [Notes] ntext COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [ReportsTo] int NULL, [PhotoPath] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [PK_Employees] PRIMARY KEY ([EmployeeID]) ON [PRIMARY] GO ALTER TABLE [dbo].[Employees] WITH NOCHECK ADD CONSTRAINT [CK_Birthdate] CHECK ([BirthDate] < getdate()) GO ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [CK_Birthdate] GO ALTER TABLE [dbo].[Employees] WITH NOCHECK ADD CONSTRAINT [FK_Employees_Employees] FOREIGN KEY ([ReportsTo]) REFERENCES [dbo].[Employees] ([EmployeeID]) ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [FK_Employees_Employees] GO CREATE INDEX [LastName] ON [dbo].[Employees] ([LastName]) ON [PRIMARY] GO CREATE INDEX [PostalCode] ON [dbo].[Employees] ([PostalCode]) ON [PRIMARY] GO |
See also