I want to find column name in my database - is it possible?

108 views Asked by At

My database name is CARE_DynamicsAX and I want to find a column name workerStatus

2

There are 2 answers

0
N00b Pr0grammer On BEST ANSWER

If I'm not wrong, you are trying to find the Table where you have a column name as workerStatus. If that is the case, you might run this query to find the same.

This works for the column names from TABLES for SQL Server.

This query would run under the assumption that you know that the column name that you are searching starts with workerStat

SELECT c.name AS ColName, t.name AS TableName
FROM sys.columns c
    JOIN sys.tables t ON c.object_id = t.object_id
WHERE c.name LIKE 'workerStat%'
0
Sracanis On
select * from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME = 'workerStatus'