DECLARE @dropDefault nvarchar(max);

SELECT 
	@dropDefault = STUFF((
select  'ALTER TABLE AKUZ.' + t.name + ' DROP CONSTRAINT ' + dc.name + ' '
from sys.default_constraints dc
join sys.tables t on t.object_id = dc.parent_object_id
where t.name in ('T_IEMK_IHE_DOCUMENT_EVENT', 'T_RABBIT_SEND_OBJECT') and dc.type_desc = 'DEFAULT_CONSTRAINT'
FOR XML PATH(''), TYPE).value('.', 'varchar(max)'), 1, 0, ' ')

if(@dropDefault is not null)
begin
	EXEC sp_executesql @dropDefault;
end



