3 ways to find out if the column in table exists
There are at least 3 ways to find out if the column in table exists in MS SQL server. It's a common task for developers or administrators when you need to modify table.
1. Using COL_LENGTH
IF COL_LENGTH('AllLists', 'tp_Author') IS NOT NULL
PRINT 'Column Exists'
ELSE
PRINT 'Column doesn''t Exists'
2. Using sys.columns
IF EXISTS(SELECT 1 FROM sys.columns
WHERE Name = N'tp_Author'
AND Object_ID = Object_ID(N'AllLists'))
PRINT 'Column Exists'
ELSE
PRINT 'Column doesn''t Exists'
3. Using INFORMATION_SCHEMA.COLUMNS
IF EXISTS
(
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'AllLists'
AND column_name = 'tp_Author'
)
PRINT 'Column Exists'
ELSE
PRINT 'Column doesn''t Exists'

Login as another user in SharePoint 2019 on-premises site in Chrome
Set limited Wi-Fi connection within command line in Windows
A sticker problem with the fan in HP laptop