Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8 - Renaming Coulmns
amerar_at_iwc.net wrote:
> HI All,
>
> I once say an article to rename coluns in Oracle 8. It used some X$
> dictionary tables. Can't see to find that anywhere.......
>
> Also, we are now running Orcle .9.2.0.7. Can we change the order of
> the columns using the same data disctionary approach??
>
> Thanks!
>
X$ tables do not persist across instance shutdowns. So modifying X$ anything would not solve the problem. The solution you are referring to most likely modified SYS.COL$ instead. But this is definitely not advised....doing runs the risk of causing data dictionary corruption.
You could modify SYS.COL$ to change the order of the columns, but that would cause real difficulties and the order or the columns in the row in each data block would not change. So trying this operation is a recipe for disaster...
And this brings us to the real question...why do you care about the order of the columns? According to relational database theory, there is not specific ordering of the columns or rows in a table. Your SELECT statements don't care which order the columns are in the table, unless you do "SELECT *" which, IMO, is not good programming practice.
HTH,
Brian
-- =================================================================== Brian Peasland oracle_dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Thu Jun 08 2006 - 13:27:37 CDT