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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Order of columns in a table

RE: Order of columns in a table

From: Nicoll, Iain (Calanais) <iain.nicoll_at_calanais.com>
Date: Thu, 10 May 2001 12:31:26 -0700
Message-ID: <F001.002FFF11.20010510120217@fatcity.com>

Try

  1 select table_name, column_name, column_id   2* from user_tab_columns where table_name = 'PRODUCT_PROFILE' SQL> /

TABLE_NAME                     COLUMN_NAME                    COLUMN_ID
------------------------------ ------------------------------ ---------
PRODUCT_PROFILE                PRODUCT                                1
PRODUCT_PROFILE                USERID                                 2
PRODUCT_PROFILE                ATTRIBUTE                              3
PRODUCT_PROFILE                SCOPE                                  4
PRODUCT_PROFILE                NUMERIC_VALUE                          5
PRODUCT_PROFILE                CHAR_VALUE                             6
PRODUCT_PROFILE                DATE_VALUE                             7
PRODUCT_PROFILE                LONG_VALUE                             8

8 rows selected.

SQL> desc product_profile

 Name                            Null?    Type
 ------------------------------- -------- ----
 PRODUCT                         NOT NULL VARCHAR2(30)
 USERID                                   VARCHAR2(30)
 ATTRIBUTE                                VARCHAR2(240)
 SCOPE                                    VARCHAR2(240)
 NUMERIC_VALUE                            NUMBER(15,2)
 CHAR_VALUE                               VARCHAR2(240)
 DATE_VALUE                               DATE
 LONG_VALUE                               LONG

-----Original Message-----
Sent: 10 May 2001 20:01
To: Multiple recipients of list ORACLE-L

Hi!

How can I find out what the order of columns in a table is?

If I do a select * from tablename, the columns appear in a specific order. The same order than they appear when I do a describe tablename.

I can even do an insert without specifying the columns in my VALUES (.....,....) when they are in that specific order.

How and where can I find the order of the columns within a table?

Any ideas?

Yhis is 8.1.6 on Win2k.

Thanks,
Helmut

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Helmut Daiminger
  INET: hdaiminger_at_vivonet.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Nicoll, Iain (Calanais)
  INET: iain.nicoll_at_calanais.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu May 10 2001 - 14:31:26 CDT

Original text of this message

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