I have SQL server 2008 R2. I want to get column name and table name where this columns is situated. And that i want to display for specified type. For example:
let’s say i want to see all tinyint columns. The result should be the following:
ColumnName|TableName
orderID |Orders
clientID |Orders
refID |discounts
Is it possible to write query to do that?
You would use the
systemtables to get this data:Additional details on this can be found:
SQL SERVER – 2005 – List All The Column With Specific Data Types