PDA

View Full Version : Quick question - Sql server



lienlee
10-08-2010, 08:34 AM
Is there a way to search a column name in sql server 2008?
I have hundreds of tables but im looking for a specific column

Thanks!

Bob Phillips
10-09-2010, 03:19 AM
Do you mean search if a particular name is a column in a table?

You could iterate all tables, and then all columns in that table using ADOX.

stanl
10-10-2010, 02:47 AM
... or just call openschema(4) from a connection object which will return a recordset of all columns in all tables.