Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to select field names of table?

Author  Topic 

Antinsh
Starting Member

16 Posts

Posted - 2008-03-15 : 14:44:17
Can someone write a query that select all the fields of tables in database that have type 'image'?

Something like this:

Select TableName, FieldName FROM TableWhereTheyKeepThoseThings
WHERE TableWhereTheyKeepThoseThings.FieldType='Image'

... olny it should work :)

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-03-15 : 14:48:32
select * from information_schema.columns
where DATA_TYPE in ('binary', 'varbinary', 'image')


_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

Antinsh
Starting Member

16 Posts

Posted - 2008-03-15 : 14:58:50
Thanks
Go to Top of Page
   

- Advertisement -