...bringing you notes from the field...

Tag Cloud


Does SQL Server have an "ALL_TAB_COLUMNS" feature?

Yes!    

For those Oracle X.Xers finding themselves working in the SQL Server 2005/2008 world these days, you'll be happy to know all you need to do is:

1. Open up a new execute query window.

2. Type the following:

use FavoriteDbInstance

SELECT
 table_name,column_name
FROM
 information_schema.columns
WHERE
  column_name LIKE
'%whateverYouWant%'

That's it!:-) Your table names with the column name you are searching for should show up!

 

 


  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

# re: Does SQL Server have an "ALL_TAB_COLUMNS" feature?

That is cool !
U R the best 10/2/2009 10:21 PM | yaya

# re: Does SQL Server have an "ALL_TAB_COLUMNS" feature?

Thanks a ton! :) 1/13/2010 11:20 PM | Vibhas Devnani

# re: Does SQL Server have an "ALL_TAB_COLUMNS" feature?

a good tip!thanks... 10/7/2010 11:10 PM | aishwarya sarath

# re: Does SQL Server have an "ALL_TAB_COLUMNS" feature?

Awesome! Paula...you're a babe. 2/25/2011 11:36 AM | Dane