When I see desing table option in enterprise manager of a table I don't see any constraints, but when I extract ddl I can see all 6 of them. They are all unique constraints not the check constraints. Is this normal. I am new to SQL Server and would appreciate some explanation.
ThanksCould these be unique indexes you are talking about? They are different from field level constraints.|||This is the part of the DDL generated...
ALTER TABLE [EMCSdbuser].[doc2] WITH NOCHECK ADD
CONSTRAINT [DF__doc2__archive_st__623A9EC6] DEFAULT ('UAR') FOR [archive_status_cd],
CONSTRAINT [DF__doc2__viewed_cd__632EC2FF] DEFAULT ('UNV') FOR [viewed_cd],
CONSTRAINT [DF__doc2__review_typ__6422E738] DEFAULT ('NEW') FOR [review_type_cd],
CONSTRAINT [DF__doc2__pending_st__7FAD6821] DEFAULT (0) FOR [pending_state_cd],
CONSTRAINT [DF_doc2_lastaccessdate] DEFAULT (getdate()) FOR [lastaccessdate],
CONSTRAINT [DF__doc2__Message_Si__07C4568C] DEFAULT (0) FOR [Message_Size],
CONSTRAINT [AK_DOC2_EXTERNAL_IDENTIFICATION] UNIQUE NONCLUSTERED
(
[external_identification]
) ON [FG_INDEX] ,
CONSTRAINT [AK_doc2_process_date] UNIQUE NONCLUSTERED
(
[processdate],
[status_cd],
[direction_cd],
[doc2_id]
) WITH FILLFACTOR = 80 ON [FG_INDEX] ,
CONSTRAINT [AK_doc2_processdate] UNIQUE NONCLUSTERED
(
[processdate],
[doc2_id]
) WITH FILLFACTOR = 80 ON [FG_INDEX] ,
CONSTRAINT [ak_doc2_sender_address_id] UNIQUE NONCLUSTERED
(
[sender_address_id],
[doc2_id]
) WITH FILLFACTOR = 80 ON [FG_INDEX] ,
CONSTRAINT [AK_doc2_status_cd] UNIQUE NONCLUSTERED
(
[status_cd],
[processdate],
[review_type_cd],
[doc2_id]
) WITH FILLFACTOR = 80 ON [FG_INDEX] ,
CONSTRAINT [AK_doc2_subject] UNIQUE NONCLUSTERED
(
[subject],
[doc2_id]
) WITH FILLFACTOR = 80 ON [FG_INDEX]
GO
Sunday, February 12, 2012
constraint ddl
Labels:
constraint,
constraints,
database,
ddl,
desing,
enterprise,
extract,
manager,
microsoft,
mysql,
oracle,
server,
sql,
table
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment