ahmed elbarbary

ahmed elbarbary

  • 951
  • 1.6k
  • 127k

what this constrain meaning ?

Oct 28 2021 3:31 PM

I work on sql server 2012 i see constrain but i don't know what is meaning

ALTER TABLE [Parts].[TradeCodes] ADD  CONSTRAINT [UC_PartCode] UNIQUE NONCLUSTERED 
(
    [PartID] ASC,
    [CodeTypeID] ASC,
    [PartLevel] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

 

what is benfit from code above 


Answers (3)