
DECLARE @nombre varchar(1000) = ''
 set @nombre =  (Select top 1 name from sys.objects where type_desc like '%CONSTRAIN%' and 
parent_object_id=(Select object_id from sys.tables where name='seg_registroPeticion') and name like 'DF__seg_regis__men%')

if (@nombre != '')
begin
 exec  ('ALTER TABLE [seg_registroPeticion] DROP CONSTRAINT ' + @nombre )
 end
 go
 

 ALTER TABLE [dbo].[seg_registroPeticion] ALTER COLUMN mensajeRespuesta varchar(max);
