
if not exists(
	SELECT 1
	FROM sys.default_constraints c
	JOIN sys.objects o ON o.object_id = c.parent_object_id
	WHERE o.name ='ter_tercero' and c.type='D' and c.name like'%id_fo%')

	ALTER TABLE dbo.ter_tercero ADD CONSTRAINT
	DF_ter_tercero_id_formaPago DEFAULT 0 FOR id_formaPago


