Database Reference
In-Depth Information
NOT FOR REPLICATION
•
<index_option>
•
PAD_INDEX
•
FILLFACTOR
•
ON PARTITIONS
•
DATA_COMPRESSION
•
ALLOW_ROW_LOCKS
•
ALLOW_PAGE_LOCKS
•
<table_option>
Although this list may give the impression of much missing functionality, keep in mind that most of
the items in the list are there due to the fact that they're operating-system or hardware related. As an
example, the following
CREATE TABLE
statement is invalid:
•
CREATE TABLE [dbo].[Users](
[ID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[Name] [nvarchar](50) NULL,
[NTUserName] [nvarchar](128) NULL,
[Domain] [nvarchar](50) NOT NULL,
[Intro] [nvarchar](100) NULL,
[Title] [nvarchar](50) NOT NULL,
[State] [nvarchar](10) NOT NULL,
[Country] [nvarchar](100) NULL,
[PWD] [varbinary](100) NULL,
[rowguid] [uniqueidentifier] NULL,
PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
) ON [PRIMARY]
This syntax is invalid for several reasons. The
NOT FOR REPLICATION
clause on the IDENTITY column
isn't supported. Nor are the two
ON PRIMARY
clauses, the
ALLOW_ROW_LOCKS
clause, and the
ALLOW_PAGE_LOCKS
clause. However, the following syntax
is
valid:
CREATE TABLE [dbo].[Users](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50) NULL,
[NTUserName] [nvarchar](128) NULL,
[Domain] [nvarchar](50) NOT NULL,
[Intro] [nvarchar](100) NULL,
[Title] [nvarchar](50) NOT NULL,
[State] [nvarchar](10) NOT NULL,
[Country] [nvarchar](100) NULL,