DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Oracle Query Help

  1. #1
    Join Date
    Sep 2004
    Posts
    8

    Oracle Query Help

    Hi Guys,

    What is the query to get all the table and column name from a database.

    Thanks in advance

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    SELECT owner, table_name, column_name
    FROM all_tab_columns
    ORDER BY owner, table_name, column_id;

  3. #3
    Join Date
    Sep 2004
    Posts
    8
    thanks...it worked like a charm

  4. #4
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    No problem. You should become familiar with DICT. You can use this to find sys tables and views. You might also want to try to get a data dictionary poster.

  5. #5
    Join Date
    Aug 2009
    Posts
    1

    Please help me

    How to query to get the specific values at the top?
    Eg..

    If i queried to get the alphabetic order values and it resulted in like..

    Alien
    Brama
    Ganga
    Saraswati
    Yamuna

    I need a query to bring Saraswati and Yamuna in front.. like..

    Saraswati
    Yamuna
    Alien
    Brama
    Ganga

    Is it possible?? Thanks in advance!!

  6. #6
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    This post is completely unrelated to the other post. You should have created a new post for your question.

    If you want certain name to sort to the top you need another column to sell Oracle to sort certain items higher.

    Like if you had a priority column along with the name column where a lower number means that it should be listed higher in the results then you could do this:

    select name from table where ... ... order by priority, name;


    Quote Originally Posted by PradeepSmile View Post
    How to query to get the specific values at the top?
    Eg..

    If i queried to get the alphabetic order values and it resulted in like..

    Alien
    Brama
    Ganga
    Saraswati
    Yamuna

    I need a query to bring Saraswati and Yamuna in front.. like..

    Saraswati
    Yamuna
    Alien
    Brama
    Ganga

    Is it possible?? Thanks in advance!!

  7. #7
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by gandolf989 View Post
    This post is completely unrelated to the other post.
    Not to mention post was almost five years old! another government run project perhaps?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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