SQL Tips by Namwar Rizvi

April 26, 2007

Search columns in SQL Server 2005 database

Filed under: Object Search,Search columns,SQL Server 2005,TSQL — namwar @ 11:27 PM

Since SQL Server 2005 Management Studio lacks the Object Search feature, here is the simple query to find any column in a database

Select O.name objectName, C.name ColumnName from sys.columns C inner join sys.objects O ON C.object_id=O.object_idwhere C.name like ‘%ColumntoFind%’order by O.name,C.name

This query works for SQL Server 20005. Just replace “ColumnToFind” with your required column name.

Advertisements

3 Comments »

  1. You should take part in a contest for one of the finest
    blogs on the web. I most certainly will recommend this blog!

    Comment by sales calls — December 24, 2012 @ 6:54 PM | Reply

  2. Your style is very unique in comparison to other folks I
    have read stuff from. Thank you for posting when you’ve got the opportunity, Guess I will just bookmark this page.

    Comment by Louie — January 11, 2013 @ 8:31 AM | Reply

  3. I was wondering if you ever thought of changing the page layout of your blog?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people
    could connect with it better. Youve got an awful lot of text for
    only having 1 or 2 images. Maybe you could space it out better?

    Comment by telephone prospecting — January 18, 2013 @ 12:54 AM | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: