Using this SQL query I will find that Particular column is exist in table or not.
just pass table name and pass column name that we want to check.
IF COL_LENGTH(‘Table name’,’Column name’) IS NOT NULL
BEGIN
PRINT ‘Your Column Exists’
END
ELSE
BEGIN
PRINT ‘Your Column not Exists’
END
just pass table name and pass column name that we want to check.
IF COL_LENGTH(‘Table name’,’Column name’) IS NOT NULL
BEGIN
PRINT ‘Your Column Exists’
END
ELSE
BEGIN
PRINT ‘Your Column not Exists’
END
Comments
Post a Comment