IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'agendatelefone') AND COL_LENGTH('[dbo].[agendatelefone]', 'ddd') IS  NOT NULL
BEGIN
  ALTER TABLE [dbo].[agendatelefone] ALTER COLUMN ddd VARCHAR(20) NULL;
END