Sql – Find all columns of a certain type in all tables in a SQL Server database

sqlsql-server-2008

How can I find all columns of a certain type (for example NTEXT) in all tables in a SQL Server database?

I am looking for a SQL query.

Best Solution

You can use following query to return fields

SELECT table_name [Table Name], column_name [Column Name]
FROM information_schema.columns where data_type = 'NTEXT'