DECLARE @Id INT;                               
SELECT  @Id = id
FROM    sysobjects
WHERE   name = 'IRI_Drugs';
IF NOT EXISTS ( SELECT  *
                FROM    syscolumns
                WHERE   id = @Id
                        AND name = 'InsertDate' )
    ALTER TABLE dbo.IRI_Drugs ADD  InsertDate SMALLDATETIME NULL;
