Results 1 to 6 of 6

Thread: SELECT Question

  1. #1
    Join Date
    Apr 2011
    Posts
    3

    Question SELECT Question

    I want to write a SQL statement that says
    SELECT column_name
    FROM __________________

    The FROM should be all tables. I have tried saying FROM * but I get an Invalid Table Name error when I do that.

    Any help would be appreciated.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Can't do, one table at a time.

  3. #3
    Join Date
    Apr 2011
    Posts
    3
    Thanks for answering my question. I was afraid that might be the answer.

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    What is the requirement for doing that?. You can get data from multiple table using UNION

    select col
    from table1
    union
    select col
    from table2

  5. #5
    Join Date
    Apr 2011
    Posts
    3

    Success

    Success! The following sql worked!

    select table_name, column_name
    from user_tab_columns
    order by table_name

  6. #6
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Ok, if you are looking for all table and column names in a database schema that is the query for Oracle. It was not clear from your original posting.

Posting Permissions

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