Hi. The Transact-SQL script below returns the following information: ID – Just an identity column used within the script SchemaName – The name of the schema TableName – Obviously, the name of the table 🙂 ColumnName Type – The data type of the column Length – The maximum number of bytes used by the field […]
The code contained in this post can be used to find all tables that contain columns that have “ADDRESS” in the name. It can easily be modified to search for table column names with any specific word.
The Transact-SQL query in this post returns the table name, column name, data type, and maximum length. This is useful when producing database documentation
The code within this post, is an example of how to retrieve the column/field names from the header row from a text file, and add them to a “ListBox”.