IF EXISTS (
    SELECT 1
    FROM sys.key_constraints
    WHERE name = 'PK_PDV_VD_LINX_BINS'
      AND parent_object_id = OBJECT_ID('dbo.PDV_VD_LINX_BINS')
)
BEGIN
    ALTER TABLE [dbo].[PDV_VD_LINX_BINS]
    DROP CONSTRAINT [PK_PDV_VD_LINX_BINS];
END
GO

ALTER TABLE [dbo].[PDV_VD_LINX_BINS]
ADD CONSTRAINT [PK_PDV_VD_LINX_BINS] PRIMARY KEY CLUSTERED
(
    [CD_EMP] ASC,
    [CD_FILIAL] ASC,
    [CD_VD] ASC,
    [COD_BIN] ASC,
    [CD_TRN_TEF] ASC
);
GO