Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list all char columns

Status
Not open for further replies.

pmgatwork

Programmer
May 7, 2004
83
GB
Hi all
Is there a way to output all table columns which are type CHAR

Thanks
Peter
 
You mean just the definitions?

Code:
EXEC sp_MSForEachDB 'IF ''[?]'' NOT IN (''master'', ''model'', ''msdb'', ''tempdb'') 
select ''[?]'' as DB_name, * from [?].information_schema.columns
where data_type = ''Char''
order by 1,table_name,ordinal_position'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top