Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: table's column names

Re: table's column names

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: 27 Nov 2006 07:02:28 -0800
Message-ID: <1164639748.457841.71770@l39g2000cwd.googlegroups.com>


Filipe David Borba Manana wrote:
> Greetings!
>
> How can I discover the name of all the columns for each table defined by
> a user?
> Is there any system table which I can query for that purpose?
>
> many thanks

SELECT
  OWNER,
  TABLE_NAME,
  COLUMN_NAME,

  DATA_TYPE,
  DATA_LENGTH,
  DATA_PRECISION,
  DATA_SCALE,

  NULLABLE,
  COLUMN_ID
FROM
  DBA_TAB_COLUMNS
WHERE
  OWNER='MY_USER'
ORDER BY
  OWNER,
  TABLE_NAME,
  COLUMN_ID; DBA_TAB_COLUMNS may be substituted with ALL_TAB_COLUMNS.

Charles Hooper
PC Support Specialist
K&M Machine-Fabricating, Inc. Received on Mon Nov 27 2006 - 09:02:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US