SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2001
    Location
    Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MYSQL Query ????

    I want to do something similar to this

    select *
    from (select table_name table from user_tables)
    where (desc table) like '_%'

    but I know I cant run the (desc table) part - I want to do something like that.

    I want to have all the fields in the where clause and I dont want to have to type them all out (if possible)

    I do realise that this query will take a long long time to actually execute and I do know that the subquery will only search for tables available to the user that is logged in

    wabirdman
    signature

  2. #2
    SitePoint Member
    Join Date
    Aug 2001
    Location
    Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried doing this

    where (select column_name from user_tab_columns) like '%NAME%'

    but it comes up with this error

    'ORA 01427 - single row subquery returns more than one row'

    Is someone able to help me. I am using oracle 8.1.6 as my database and TOAD as my SQL editor/database connection (if this makes a difference)

    wabirdman
    signature


Bookmarks

Posting Permissions

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