I have 2 Requirements:
I want to write a SQL Command to fetch the Column Names from a Participant Table where the Column Name must be matching the word
%Track%
.I want to fetch all the Table Name in the Database where it contains Column Name LIKE
%Track%
"USER_TAB_COLUMNS"
Does not run but gives error. Invalid object name 'USER_TAB_COLUMNS'.
SELECT [name] AS [Column Name]
FROM syscolumns
WHERE id = (SELECT id FROM sysobjects WHERE type = 'V' AND [Name] = 'Participant')
Runs but there is no record fetched by this query.
Please suggest me the Query which will give me the desired resultant.