Monday, October 10, 2016

SQLServer - Find a column in a database



I needed to search a SQLServer database to see if there was a column name containing an email address. This worked perfectly.

select * from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME like '%mail%'
order by TABLE_NAME


No comments:

Post a Comment