Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Posts
    2

    Red face Unanswered: Columns in database

    Hi Group,

    This might sound silly, but how can I find the tablenames in MSSQL2000 with which contain a certain columnname?

    For example I want to get all the tablenames in a database which contain the column ProjectID.

    Thanks for your help

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    select * from INFORMATION_SCHEMA.COLUMNS where column_name='columnname'
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Apr 2003
    Posts
    2

    Thumbs up

    Originally posted by Satya
    select * from INFORMATION_SCHEMA.COLUMNS where column_name='columnname'
    Your the BEST!!
    Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •