Created
August 29, 2012 04:04
-
-
Save erjjones/3506700 to your computer and use it in GitHub Desktop.
Sample Contacts Table for the Get Collection Store Procedure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE dbo.Contacts ( | |
ContactID int IDENTITY (1,1) NOT NULL, | |
FirstName nvarchar(64) NULL, | |
LastName nvarchar(64) NULL, | |
Phone nvarchar(50) NULL, | |
[Address] nvarchar(128) NULL, | |
City nvarchar(50) NULL, | |
[State] nvarchar(50) NULL, | |
Zip nvarchar(50) NULL, | |
Country nvarchar(128) NULL, | |
Company nvarchar(64) NULL, | |
Website nvarchar(512) NULL, | |
EmailAddress nvarchar(128) NOT NULL, | |
IsActive bit NOT NULL CONSTRAINT DF_Contacts_IsActive DEFAULT((1)), | |
CreatedDate smalldatetime NOT NULL CONSTRAINT DF_Contacts_CreatedDate DEFAULT(GETDATE()), | |
ModifiedDate smalldatetime NOT NULL CONSTRAINT DF_Contacts_ModifiedDate DEFAULT(GETDATE()), | |
CONSTRAINT PK_Contacts_EmailAddress PRIMARY KEY CLUSTERED (EmailAddress) | |
) | |
CREATE UNIQUE NONCLUSTERED INDEX IX_Contacts_ContactID ON | |
dbo.Contacts(ContactID) INCLUDE (FirstName, IsActive) | |
WITH(ONLINE=ON) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment