IF NOT EXISTS (
    SELECT 1 
    FROM sys.columns 
    WHERE name = 'CD_PG_CRED'
      AND object_id = OBJECT_ID('dbo.PG_DESP_RAT_PG_CRED')
)
BEGIN
    ALTER TABLE dbo.PG_DESP_RAT_PG_CRED
    ADD CD_PG_CRED INT NULL;
END