Advertisement
bluebunny72

Unique Constraint

May 27th, 2015
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.34 KB | None | 0 0
  1. IF  EXISTS (SELECT TOP 1 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UQ_dept_Uf_ILC_CostCodeType]') AND type = N'UQ')
  2.     ALTER TABLE [dbo].[dept] DROP CONSTRAINT [UQ_dept_Uf_ILC_CostCodeType]
  3. GO
  4.  
  5. ALTER TABLE [dbo].[dept] ADD  CONSTRAINT [UQ_dept_Uf_ILC_CostCodeType] UNIQUE NONCLUSTERED
  6. (
  7.        [Uf_ILC_CostCodeType] ASC
  8. )
  9. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement