Sql Server Search Column Name In All Tables

[Solved] Sql Server Search Column Name In All Tables | Sql - Code Explorer | yomemimo.com
Question : sql server search column name in all tables

Answered by : luigi-zambetti

SELECT COLUMN_NAME AS 'ColumnName' ,TABLE_NAME AS 'TableName'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%MyName%'
ORDER BY TableName ,ColumnName;

Source : https://stackoverflow.com/questions/4849652/find-all-tables-containing-column-with-specified-name-ms-sql-server | Last Update : Sat, 14 Mar 20

Question : search for column name in sql db when i don't know which table it is in

Answered by : tense-tapir

Select * from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME LIKE '%MyName%'

Source : https://stackoverflow.com/questions/4849652/find-all-tables-containing-column-with-specified-name-ms-sql-server | Last Update : Wed, 30 Sep 20

Question : Find all tables containing column with specified name - MS SQL Server

Answered by : smilingsamurai

SELECT c.name AS 'ColumnName' ,t.name AS 'TableName'
FROM sys.columns c
JOIN sys.tables t ON c.object_id = t.object_id
WHERE c.name LIKE '%MyName%'
ORDER BY TableName ,ColumnName;

Source : https://stackoverflow.com/questions/4849652/find-all-tables-containing-column-with-specified-name-ms-sql-server | Last Update : Mon, 27 Jul 20

Question : search column name sql

Answered by : disgusted-dormouse-ptfpu4gx5zda

SELECT TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%wild%';

Source : https://stackoverflow.com/questions/193780/how-can-i-find-all-the-tables-in-mysql-with-specific-column-names-in-them | Last Update : Tue, 04 Jan 22

Question : find a column by name in a sql server table

Answered by : talented-turtle-hvgi0mi3oy12

Get Table by Column Name

Source : | Last Update : Wed, 02 Mar 22

Answers related to sql server search column name in all tables

Code Explorer Popular Question For Sql