Find a table name
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Find a table name

  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Find a table name

    Hi,

    Do anobody knows any procedure at PL/SQL which returns name of table and column which contain a desired value. I'm adding something to database threw GUI and I dont know in which table this value is added. Maybe there is some procedure which do somethong like this:

    select * from * where exist ‘some string

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,027
    SELECT table_name FROM all_tab_columns WHERE column_name = 'string';???
    this space intentionally left blank

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    no, since it's brute force you have to code one yourself!

  4. #4
    Join Date
    Apr 2006
    Posts
    2
    I've got lets say 100 tables and 10 columns at each but only 5 rows per table so db is not big. But i want to find a string in such DB. Is there any tool for this or procedure?

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    No, there is no such tool.

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    search asktom for search_schema (he wrote one)

  7. #7
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Quote Originally Posted by alldaron@wp.pl
    Hi,

    Do anobody knows any procedure at PL/SQL which returns name of table and column which contain a desired value. I'm adding something to database threw GUI and I dont know in which table this value is added. Maybe there is some procedure which do somethong like this:

    select * from * where exist ‘some string

    Please get rid of the application designer ASAP.

    Tamil

  8. #8
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    Quote Originally Posted by tamilselvan
    Please get rid of the application designer ASAP.

    Tamil
    Why? why would the front end user need to know what tables are being used in the gui?

  9. #9
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Quote Originally Posted by davey23uk
    Why? why would the front end user need to know what tables are being used in the gui?
    Assume the following two tables exist in a schema.

    CUSTOMER
    CUSTOMER_ID NUMBER
    LAST_NAME VARCHAR2(30)
    FIRST_NAME VARCHAR2(30)

    SUPPLIER
    SUPPLIER_ID NUMBER
    LAST_NAME VARCHAR2(30)
    FIRST_NAME VARCHAR2(30)

    SELECT table_name FROM all_tab_columns
    WHERE column_name = 'LAST_NAME'
    will return both CUSTOMER and SUPPLIER tables.

    Now tell me which one do you want?

    Tamil
    www.beaconinfotechcorp.com

  10. #10
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    but thats nothing to do with the original quesrion

    he had no idea what tables his app was using (and why should he)

Posting Permissions

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


Click Here to Expand Forum to Full Width