if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[T_TestTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
if (NOT exists ( select * from dbo.syscolumns where name = 'sum' and id in
(select id from dbo.sysobjects where id = object_id(N'[dbo].[T_TestTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1))
)
ALTER TABLE [dbo].[T_TestTable] ADD sum float
GO
if (NOT exists ( select * from dbo.syscolumns where name = 'sum' and id in
(select id from dbo.sysobjects where id = object_id(N'[dbo].[T_TestTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1))
)
ALTER TABLE [dbo].[T_TestTable] ADD sum float
GO