IF EXISTS (
    SELECT 1
    FROM sys.objects o
    WHERE o.type = 'UQ'
      AND o.name = 'IX_RC_DEB_RC_DEB_NEGOCIACAO'
      AND o.parent_object_id = OBJECT_ID('dbo.RC_DEB_RC_DEB_NEGOCIACAO')
)
BEGIN
    ALTER TABLE [dbo].[RC_DEB_RC_DEB_NEGOCIACAO] 
    DROP CONSTRAINT [IX_RC_DEB_RC_DEB_NEGOCIACAO];
END
GO

ALTER TABLE [dbo].[RC_DEB_RC_DEB_NEGOCIACAO] ADD CONSTRAINT [IX_RC_DEB_RC_DEB_NEGOCIACAO] UNIQUE NONCLUSTERED
(
    [CD_RC_DEB] ASC,
    [CD_RC_DEB_ORIG] ASC,
    [CD_FILIAL_ORIG] ASC,
    [CD_EMP] ASC
)
WITH (
    PAD_INDEX = OFF, 
    STATISTICS_NORECOMPUTE = ON, 
    SORT_IN_TEMPDB = OFF, 
    IGNORE_DUP_KEY = OFF, 
    ONLINE = OFF, 
    ALLOW_ROW_LOCKS = ON, 
    ALLOW_PAGE_LOCKS = ON, 
    FILLFACTOR = 97
) ON [PRIMARY];
GO