RE: adding col in between....

  • From: "David Wendelken" <davewendelken@xxxxxxxxxxxxx>
  • Date: Tue, 19 Jul 2005 07:17:20 -0400

Just proof that one REALLY CANNOT make things fool proof, because fools are
so ingenious!
 
 

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Carel-Jan Engel
Sent: Tuesday, July 19, 2005 6:06 AM
To: Lex de Haan
Cc: onkarnath.tiwary@xxxxxxxxx; oracle-l@xxxxxxxxxxxxx
Subject: RE: adding col in between....


Maybe the 'why' question can be answered. I was involved in a project, where
all queries were 'select * from.....'. And all updates updated every single
column, of course, whether the contents changed or not.

Yes, it was Java. They 'generated' the SQL, and required all columns to be
in alphabetical order. 

So, every table got recreated when columns were added. And columns got added
almost daily, during the development phase. There was no predesigne data
model, it grew organically, every day, when an XtremeProgrammer needed some
'fields' to store 'something'.

Althought this explains why one would do this, it still doesn't make any
sense.
No surprise they got -some- performance problems.... Let alone the burden of
deployment of new releases, with a minimum of downtime.

Best regards,

Carel-Jan Engel

===
If you think education is expensive, try ignorance. (Derek Bok)
===

On Tue, 2005-07-19 at 11:15, Lex de Haan wrote: 

... 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>
http://www.naturaljoin.nl/events/seminars.html
------------------------------------------------------------------

 

  _____  

From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Onkar N Tiwary
Sent: Tuesday, July 19, 2005 07:39
To: oracle-l@xxxxxxxxxxxxx
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
 <mailto:to_onkar@xxxxxxxxx> to_onkar@xxxxxxxxx
onkarnath.tiwary@xxxxxxxxx



        

Other related posts: