IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'DRKURUMBILGISIGOSTER' AND SYSOBJECTS.name = 'MEDIWEBAYARLAR')
ALTER TABLE dbo.MEDIWEBAYARLAR ADD
	DRKURUMBILGISIGOSTER BIT NULL
GO

IF EXISTS (SELECT [name] FROM [sys].[database_principals] WHERE [type] = N'S' AND [name] = N'mediwebuser')
BEGIN
	BEGIN TRY
		GRANT SELECT ON [dbo].[MEDIWEBAYARLAR] TO [mediwebuser]
	END TRY
	BEGIN CATCH
	END CATCH
END
GO