Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    13

    Unanswered: Query to search the field in database

    I need to find the field name in the table column. I know only the Database name. Its haveing more than 75 tables.I know only the part of filed name. Can u please help to create the query to find the filed of the column in database.

  2. #2
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    Try
    Code:
    SELECT 
       TABLE_SCHEMA, 
       TABLE_NAME, 
       COLUMN_NAME, 
       DATA_TYPE 
    from INFORMATION_SCHEMA.COLUMNS
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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