#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    40
    Rep Power
    1

    Search for column


    Hi there!
    I am currently on a sql server at my job and I am trying to find a certain column named I_BONDPRICE_VALUATION_N

    Is there a query that can run through the server looking for this column?
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,920
    Rep Power
    1045
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    40
    Rep Power
    1
    Originally Posted by Jacques1
    Thank you for linking that, I am quite new at mysql, sorry!
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    40
    Rep Power
    1
    Originally Posted by Jacques1
    I've tried doing this btw,

    Code:
    select * from pq.client_data where column_name like '%VALUATION%'
    But I dont wan't to search through only that table but the whole server.. if its possible!
  8. #5
  9. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,920
    Rep Power
    1045
    I have no idea what you're doing there. What is pq.client_data?

    The system table I gave you is called information_schema.columns, and it contains all columns from all tables of all databases.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    40
    Rep Power
    1
    Code:
    select * 
    from information_schema.COLUMNS 
    where column_name like '%I_BONDPRICE_VALUATION_N%'
    SOLVED.

IMN logo majestic logo threadwatch logo seochat tools logo