NDS Care - Customer Support Portal
            Knowledge Base NDS Knowledgebase SQL

            Query to search database for Column Name in tables

            Use YourDatabase

            SELECT t.name AS table_name,
            SCHEMA_NAME(schema_id) AS schema_name,
            c.name AS column_name
            FROM sys.tables AS t
            INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
            WHERE c.name LIKE '%MyColumn%'
            ORDER BY schema_name, table_name;
            Updated: 21 Jan 2019 02:35 PM
            Helpful?  
            Help us to make this article better
            1 0