if not exists (
    select *
      from sys.all_columns c
      join sys.tables t on t.object_id = c.object_id
      join sys.schemas s on s.schema_id = t.schema_id
      join sys.default_constraints d on c.default_object_id = d.object_id
    where t.name = 'T_KSG'
      and c.name = 'NOT_ONK_SL'
      and s.name = 'IES'	  
)
BEGIN
	ALTER TABLE [IES].[T_KSG] ADD CONSTRAINT [DF_T_KSG_NOT_ONK_SL]  DEFAULT ((0)) FOR [NOT_ONK_SL]
END