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

Sachin SinghRank #66 · 26.2K reputationPosted Oct 29, 2021, 1:07 AM EDT
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Oct 28, 2021, 4:19 PM EDT
Daril148 reputationPosted Oct 29, 2021, 7:38 AM EDT