IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'USERID' AND SYSOBJECTS.name = 'TMITEMGRUP')

ALTER TABLE TMITEMGRUP ADD  USERID INT NULL
GO


