Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2003
    Location
    Paris
    Posts
    38

    Unanswered: recordset meta-data

    What sort of information (if any) can I get on a recordset generated by a SELECT?

    I'd particulary be interested in column names. Is it possible?
    Cordialement

  2. #2
    Join Date
    Jan 2002
    Location
    India
    Posts
    15
    If you are using java then using resultset meta data you can get the column names for the table which is used in select statement.

  3. #3
    Join Date
    Feb 2003
    Location
    Paris
    Posts
    38
    Thanks for the reply.


    What if I'm using SQL, PLSQL?
    Cordialement

  4. #4
    Join Date
    Jan 2002
    Location
    India
    Posts
    15
    you can use the system view to get the column name,

    Here is a SQL query

    select COLUMN_NAME from all_tab_columns where table_name = 'AREA'

  5. #5
    Join Date
    Feb 2003
    Location
    Paris
    Posts
    38
    What I want is to know the column names from a select query,

    e.g. what are the columns returned from

    select * from tbl1, tbl2
    Cordialement

  6. #6
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208
    When you select * you get every column in the table. So in your example you would get every column in tbl1 and every column in tbl2. If you want to see what columns are in a table you can run

    SQL> Desc tbl1;

    This will return you the description of the table in the format

    column 1 data type(precision),
    column 2 data type(precision),

    In your Pl/Sql program you should only select the columns you want and not use Select *



    Originally posted by Crassus
    What I want is to know the column names from a select query,

    e.g. what are the columns returned from

    select * from tbl1, tbl2

Posting Permissions

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