-
find a column in all the table
Hi,
I need to find the text data type column in all the table.
Please let me know the script.
Thanks,
Ravi
-
select 'select "'+a.name+ '",'+ b.name+' from ' + a.name from sysobjects a,syscolumns b, systypes c where
a.id = b.id and c.xtype=b.xtype and c.xtype in (35) and a.type ='u'
go
Execute the above statement it will give you all the table names and column names with text datatype.
-
Mak,
Thanks for the query.
Here is another query i have found.
select c.name colum_name ,t.name data_type, o.name table_name from syscolumns c,sysobjects o,systypes t
where c.id=o.id
and o.type = 'U'
and c.xtype = t.xtype
and c.xtype in (35)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|