
IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'RNUM' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD RNUM int NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'LOINCGRUPADI' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD LOINCGRUPADI [nvarchar](250) NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'BILESEN' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD BILESEN [nvarchar](250) NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OZELLIK' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD OZELLIK [nvarchar](250) NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ZAMANLAMA' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD ZAMANLAMA [nvarchar](250) NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'MATERYAL' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD MATERYAL [nvarchar](250) NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'SKALA' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD SKALA [nvarchar](250) NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'METOD' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD METOD [nvarchar](250) NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OLUSTURULMATARIHI' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD OLUSTURULMATARIHI datetime NULL

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'GUNCELLENMETARIHI' AND SYSOBJECTS.name = 'TSUTLOINC')
ALTER TABLE TSUTLOINC ADD GUNCELLENMETARIHI datetime NULL