From oracle-l-bounce@freelists.org Tue Jul 19 04:45:51 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j6J9jpPf003039 for ; Tue, 19 Jul 2005 04:45:51 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j6J9jkIP003020 for ; Tue, 19 Jul 2005 04:45:46 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id DF40D1D6932; Tue, 19 Jul 2005 04:45:42 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07849-04; Tue, 19 Jul 2005 04:45:42 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 56A2C1D157C; Tue, 19 Jul 2005 04:45:42 -0500 (EST) From: "Pete Sharman" To: "lex.de.haan@naturaljoin.nl" , "onkarnath.tiwary@gmail.com" , "oracle-l@freelists.org" Cc: "Peter Ross Sharman" Subject: RE: adding col in between.... Date: Tue, 19 Jul 2005 19:43:34 +1000 In-Reply-To: <20050719091553.CBFA41D1BFC@turing.freelists.org> Message-ID: <20050719194334886.00000000560@psharman-au> MIME-Version: 1.0 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by Ecartis X-Brightmail-Tracker: AAAAAQAAAAIX-Whitelist: TRUE X-archive-position: 22640 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: peter.sharman@oracle.com Precedence: normal Reply-To: peter.sharman@oracle.com X-list: oracle-l X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net X-mailscan-MailScanner-Information: Please contact the ISP for more information X-mailscan-MailScanner: Found to be clean X-MailScanner-From: oracle-l-bounce@freelists.org X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on air891.startdedicated.com X-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,HTML_70_80, HTML_FONTCOLOR_UNKNOWN,HTML_MESSAGE,MIME_HTML_ONLY autolearn=no version=2.63

Lies, lies, damn lies!

 

Of course there’s a direct way to do it.  Drop the table and recreate it with the columns in the right order!  ;)

 

Sorry, Lex, couldn’t resist.  I still recall the days of telling people how to do this to speed up their queries since Oracle only unravels a row far enough down the column definitions to get the information you need.  Ah, those were the days!  J

 

 

Pete

 

"Controlling developers is like herding cats."

Kevin Loney, Oracle DBA Handbook

 

"Oh no, it's not.  It's much harder than that!"

Bruce Pihlamae, long-term Oracle DBA


From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of Lex de Haan
Sent: Tuesday, 19 July 2005 7:16 PM
To: onkarnath.tiwary@gmail.com; oracle-l@freelists.org
Subject: RE: adding col in between....

 

... and the counter question is: why would you ever want to do this?

this is highly un-relational, because column ordering is supposed to be meaningless.

well, let me answer your question anyway: in Oracle, there is no direct way to accomplish this.

check out the DBMS_REDEFINITION package -- that will do the job for you, if you insist :-)

 

cheers,

Lex.

------------------------------------------------------------------
Steve Adams Seminar
http://www.naturaljoin.nl/events/seminars.html
------------------------------------------------------------------

 

 


From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of Onkar N Tiwary
Sent: Tuesday, July 19, 2005 07:39
To: oracle-l@freelists.org
Subject: adding col in between....

hi all,

 

Is it possible to add a new column in the between of table. For ex. Say there is a table as

 

col position              col name

1                               ID

2                               Name

3                               Address

 

I have to add a col. after NAME col and before ADDRESS col. Is it possible ? how ?

 

TIA

--
Thanks & Regards,
T. Onkar Nath
to_onkar@yahoo.com
onkarnath.tiwary@gmail.com
 

-- http://www.freelists.org/webpage/oracle-l