CREATE FUNCTION ColumnExists(@TableName varchar(100), @ColumnName varchar(100))
RETURNS varchar(1) AS
BEGIN
DECLARE @Result varchar(1);
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = @TableName AND COLUMN_NAME = @ColumnName)
BEGIN
SET @Result = 'T'
END
ELSE
BEGIN
SET @Result = 'F'
END
RETURN @Result;
END
GO
GRANT EXECUTE ON [ColumnExists] TO [whoever]
GO
USAGE:
IF ColumnExists('LG_107_SPECODES', 'MARKA') = 'F'
BEGIN
ALTER TABLE LG_107_SPECODES
ADD MARKA varChar(50) NOT NULL
END
GO
Kaydol:
Kayıt Yorumları (Atom)
BlackListIP control on Serenity platform (.NET Core)
In the Serenity platform, if you want to block IPs that belong to people you do not want to come from outside in the .net core web project,...
-
In the Serenity platform, if you want to block IPs that belong to people you do not want to come from outside in the .net core web project,...
-
TABLO ADI AÇIKLAMA L_PERSONEL Çalışma Alanı Tanımları L_SYSLOG Kullanıcı Kaydı İzleme L_L...
-
Microsoft OLE DB Provider for SQL Server : Cannot create a row of size 8100 which is greater than the allowable maximum of 8060. (80040E14) ...
Hiç yorum yok:
Yorum Gönder