Results 1 to 4 of 4

Thread: Column Names

  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Question Unanswered: Column Names

    Is there a way to select just column names out of a database?

  2. #2
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208

    Re: Column Names

    DESC TABLENAME;

    - Will return the table description

    SELECT *
    FROM ALL_TAB_COLUMNS
    WHERE TABLE_NAME = 'TABLENAME'
    ORDER BY COLUMN_ID;

    - Will return data about the all the columns in a table

    SELECT *
    FROM TABLE
    WHERE 1=2

    - Will return 0 rows, but will give you the column names

    Originally posted by kerri_09
    Is there a way to select just column names out of a database?

  3. #3
    Join Date
    Oct 2003
    Posts
    2
    sorry I don't understand what 's the purpose of the
    "WHERE 1=2" ???

    i need to be able to print the column names to the screen
    Last edited by kerri_09; 10-03-03 at 14:29.

  4. #4
    Join Date
    Oct 2003
    Location
    St.Louis,MO
    Posts
    120
    1 simply does not = 2..... So no records will be returned.
    Just the column headings.

Posting Permissions

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