IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_NIPS_YI' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_NIPS_YI  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_NIPS_A' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_NIPS_A  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_NIPS_SK' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_NIPS_SK  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_NIPS_KOL' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_NIPS_KOL  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_NIPS_BACAK' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_NIPS_BACAK  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_NIPS_UYAN' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_NIPS_UYAN  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_AGRI1' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_AGRI1  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_AGRI2' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_AGRI2  int NULL
GO



IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_AGRI3' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_AGRI3  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_AGRI4' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_AGRI4  int NULL
GO


IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_ENT_YI' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_ENT_YI  int NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_ENT_U' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_ENT_U  int NULL
GO


IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'YDYB_ENT_M' AND SYSOBJECTS.name = 'HYATISAGRI')
ALTER TABLE dbo.[HYATISAGRI] ADD YDYB_ENT_M  int NULL
GO