Possible Duplicate:
INFORMATION_SCHEMA vs sysobjects
I'm maintaining an old system (SQL Server 2005) and have come across 2 versions of a select statement that do the same thing.
Is one of the statements below more valid than the other?
SELECT 1
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'tblMyTable' AND COLUMN_NAME = 'MyColumn'
or
SELECT 1
FROM sys.columns
WHERE object_id = OBJECT_ID(N'[dbo].[tblMyTable]') AND name = N'MyColumn'