RE: Renaming a Column
What's wrong ? All Neena did was give another answer to the original question - she even said don't do it except in test. -Original Message- Sent: Wednesday, February 14, 2001 9:41 PM To: Multiple recipients of list ORACLE-L Boy, am I tired of people suggesting this kind of thing. What's the point, when there are SUPPORTED and SAFE ways of doing what you want? Paul Baumgartel InstiPro, Inc. [EMAIL PROTECTED] 212 813-0829 x103 (office) 917 549-4717 (mobile) -Original Message- Sent: Wednesday, February 14, 2001 12:23 PM To: Multiple recipients of list ORACLE-L Hi, The suggestion till yet provided are the correct ones and safest. But try this in your test database, get you table id from sys.obj$ table. Then get the columns details from sys.col$ table by giving the table id in where clause. Update the row which corresponds to the column which you want to modify. -- neena ??? wrote: from Oracle 8i you can drop columns with -- alter table table_name drop column column_name; and then your can add columns with the name to which you want to rename alter table table_name add(column_name type); -Original Message- ]On Behalf Of bipin sahani Sent: Wednesday, February 14, 2001 3:05 PM To: Multiple recipients of list ORACLE-L In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com http://www.hotmail.com . -- Please see the official ORACLE-L FAQ: http://www.orafaq.com http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).Wsz^r9,BmY(a 9c}vsV +r5pzqw9PY9tTsoe8z'EURs-'xs?'zoeq,-).+-: **.}sbf-)-+-jqj)fz -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Sam P. Roberts (ZADCO ITIS) INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a Column
from Oracle 8i you can drop columns with -- alter table table_name drop column column_name; and then your can add columns with the name to which you want to rename alter table table_name add(column_name type); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of bipin sahani Sent: Wednesday, February 14, 2001 3:05 PM To: Multiple recipients of list ORACLE-L Subject: Re: Renaming a Column In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).z}ND @Bm +irhDNX_]wBz(Dz9Nuw9'+bpzz?1xlND0D_~x%lzwZCYzFj"'(z-xE + ;)zYb .+-jwb^,j86"nuw{ZxCRP ". x%rhmu.,zwm ,(fu+^)*')rx
RE: Renaming a Column
Well, it isn't recommend it but you can update the field name of sys.col$ table. Regards. -Mensaje original- De: bipin sahani [SMTP:[EMAIL PROTECTED]] Enviado el: mircoles 14 de febrero de 2001 7:05 Para: Multiple recipients of list ORACLE-L Asunto: Re: Renaming a Column In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Trassens, Christian INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a Column
Sorry sorry ID-10-T error Cheers JL -Original Message- Sent: Wednesday, February 14, 2001 9:19 AM To: '[EMAIL PROTECTED]' Wait wait wait... Yes you can rename a column in 8i, it just depends to what value your compatibility parameter is set Regards JL -Original Message- Sent: Wednesday, February 14, 2001 8:05 AM To: Multiple recipients of list ORACLE-L In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Johan Locke@i-Commerce Services INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
Re: Renaming a Column
Ok i'll bite, i try to keep up with the new features and i'm looking at 8i(8.1.7) docs right now and i dont see it, would you like to elaborate? you can rename a table, rename a partition but NOT rename a column, this has been on the wish-list for many years just like drop column was. Feel free to flame me if i'm wrong(it does happen but rarely) :) joe "Johan Locke@i-Commerce Services" wrote: Wait wait wait... Yes you can rename a column in 8i, it just depends to what value your compatibility parameter is set Regards JL -Original Message- Sent: Wednesday, February 14, 2001 8:05 AM To: Multiple recipients of list ORACLE-L In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Johan Locke@i-Commerce Services INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). -- Joe Testa http://www.oracle-dba.com Performing Remote DBA Services, need some backup DBA support? For Sale: Oracle-dba.com domain, its not going cheap but feel free to ask :) -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Joseph S. Testa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a Column
Hi All I think I did send one out earlier. Don't bite. You can't rename a column. The combatibility parameter issue I was thinking of has to do with when you want to drop a column in 8i. That I know, has to be greater or equal to 8.1.0 when you want to drop a column Sorry again Regards JL -Original Message- Sent: Wednesday, February 14, 2001 2:10 PM To: Multiple recipients of list ORACLE-L Ok i'll bite, i try to keep up with the new features and i'm looking at 8i(8.1.7) docs right now and i dont see it, would you like to elaborate? you can rename a table, rename a partition but NOT rename a column, this has been on the wish-list for many years just like drop column was. Feel free to flame me if i'm wrong(it does happen but rarely) :) joe "Johan Locke@i-Commerce Services" wrote: Wait wait wait... Yes you can rename a column in 8i, it just depends to what value your compatibility parameter is set Regards JL -Original Message- Sent: Wednesday, February 14, 2001 8:05 AM To: Multiple recipients of list ORACLE-L In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Johan Locke@i-Commerce Services INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). -- Joe Testa http://www.oracle-dba.com Performing Remote DBA Services, need some backup DBA support? For Sale: Oracle-dba.com domain, its not going cheap but feel free to ask :) -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Joseph S. Testa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Johan Locke@i-Commerce Services INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public Internet access / Mailing Lists
RE: Renaming a Column
8i allows dropping a column or marking them as unused. I do not think you can yet rename a column. Please provide an example. Thanks Rick -Original Message- From: Saurabh Sharma [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 3:52 AM To: Multiple recipients of list ORACLE-L Subject: Re: Renaming a Column i think u can't rename a column. it's still under consideration. if u can, pls mention with some more specific syntax. it'll b helpful for all. saurabh - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Wednesday, February 14, 2001 12:50 PM Wait wait wait... Yes you can rename a column in 8i, it just depends to what value your compatibility parameter is set Regards JL -Original Message- Sent: Wednesday, February 14, 2001 8:05 AM To: Multiple recipients of list ORACLE-L In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Johan Locke@i-Commerce Services INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Saurabh Sharma INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Cale, Rick T (Richard) INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name
RE: Renaming a Column
I didn't find it any of my docs for 8.1.7 either. Is renaming a column getting confused with dropping a column? For renaming columns, one has to wait till 9i is a reality, I was told - Kirti -Original Message- From: Joseph S. Testa [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 6:10 AM To: Multiple recipients of list ORACLE-L Subject: Re: Renaming a Column Ok i'll bite, i try to keep up with the new features and i'm looking at 8i(8.1.7) docs right now and i dont see it, would you like to elaborate? you can rename a table, rename a partition but NOT rename a column, this has been on the wish-list for many years just like drop column was. Feel free to flame me if i'm wrong(it does happen but rarely) :) joe "Johan Locke@i-Commerce Services" wrote: Wait wait wait... Yes you can rename a column in 8i, it just depends to what value your compatibility parameter is set Regards JL -Original Message- Sent: Wednesday, February 14, 2001 8:05 AM To: Multiple recipients of list ORACLE-L In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Johan Locke@i-Commerce Services INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). -- Joe Testa http://www.oracle-dba.com Performing Remote DBA Services, need some backup DBA support? For Sale: Oracle-dba.com domain, its not going cheap but feel free to ask :) -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Joseph S. Testa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Deshpande, Kirti INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 53
Re: Renaming a Column
Below are the steps and examples to rename a table: 1. create a view of the table which you want to rename its column vantive desc salgrade; NameNull? Type --- GRADE NUMBER LOSAL NUMBER HISAL NUMBER vantive create view salgrade_vw as select * from salgrade; View created. 2. create a new table with new column names, and select * from the view you just created. vantive create table salgrade_new (grade_new, losal_new, hisal_new) 2 as select * from salgrade_vw; Table created. Elapsed: 00:00:00.26 vantive desc salgrade_new; NameNull? Type --- GRADE_NEW NUMBER LOSAL_NEW NUMBER HISAL_NEW NUMBER 3. drop the table which you want to change its column name. vantive drop table salgrade; Table dropped. 4. Rename the table which you created on step 3 to the table name which you dropped on step 3. vantive alter table salgrade_new rename to salgrade; Table altered. Elapsed: 00:00:00.02 vantive desc salgrade; NameNull? Type --- GRADE_NEW NUMBER LOSAL_NEW NUMBER HISAL_NEW NUMBER By the way, you can also drop the view you created on step 2 now. Good luck, Eveleen -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a Column
From the 9i New Features Doc - Online Data Evolution In this new architecture the contents of the table are copied into a new table. While the contents are copied, the updates to the original table are tracked by the database. After the copy completes, the updates are applied to the new table. Once the updates are applied, indexes can be created on the new table. After the indexes are created, any additional updates are applied and the result table replaces the original table. The table is only locked in exclusive mode at the beginning and end of the operation, when the dictionary data is updated. Using this new architecture, any physical attribute of the table can be changed online. The table can be moved to a new location. The table can be partitioned. The table can be converted from one organization (e.g. heap) to another (e.g. index organized). Additionally, many logical attributes can be changed. Column names, types, and sizes can be changed. Columns can be added, deleted, or merged. The primary restriction is that the primary key of the table cannot be modified. -Original Message- Kirti Sent: Wednesday, February 14, 2001 01:27 To: Multiple recipients of list ORACLE-L I didn't find it any of my docs for 8.1.7 either. Is renaming a column getting confused with dropping a column? For renaming columns, one has to wait till 9i is a reality, I was told - Kirti -Original Message- From: Joseph S. Testa [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 6:10 AM To: Multiple recipients of list ORACLE-L Subject: Re: Renaming a Column Ok i'll bite, i try to keep up with the new features and i'm looking at 8i(8.1.7) docs right now and i dont see it, would you like to elaborate? you can rename a table, rename a partition but NOT rename a column, this has been on the wish-list for many years just like drop column was. Feel free to flame me if i'm wrong(it does happen but rarely) :) joe "Johan Locke@i-Commerce Services" wrote: Wait wait wait... Yes you can rename a column in 8i, it just depends to what value your compatibility parameter is set Regards JL -Original Message- Sent: Wednesday, February 14, 2001 8:05 AM To: Multiple recipients of list ORACLE-L In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED] wrote: Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Johan Locke@i-Commerce Services INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line contain
Re: Renaming a Column
Hi, The suggestion till yet provided are the correct ones and safest. But try this in your test database, get you table id from sys.obj$ table. Then get the columns details from sys.col$ table by giving the table id in where clause. Update the row which corresponds to the column which you want to modify. -- neena ??? wrote: from Oracle 8i you can drop columns with -- alter table table_name drop column column_name; and then your can add columns with the name to which you want to rename alter table table_name add(column_name type); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of bipin sahani Sent: Wednesday, February 14, 2001 3:05 PM To: Multiple recipients of list ORACLE-L Subject: Re: Renaming a Column In Oracle It's not possible to rename a column.You can instead use alias for that column name in your queries. Or you have to create a new table from existing one Drop existing table.And recreate a table by selecting from new table. Regards Bipin --- Heikki Jantunen [EMAIL PROTECTED]> wrote: > Hi all, > > I need to rename some columns on my table. Any idea > how to do that... > > Thanks in advance, > > Hessu > _ > Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com. > > -- > Please see the official ORACLE-L FAQ: > http://www.orafaq.com > -- > Author: Heikki Jantunen > INET: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] (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). Do You Yahoo!? Get your free @yahoo.co.in address at http://mail.yahoo.co.in -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?bipin=20sahani?= INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).>Wz^r9,Bm(a 9c}vV +r5pzqw9P9tT8'x>'zq,).+-:*.}bf)+-jqj)fz
RE: Renaming a column
Have you personally done this in your test database (and may be in your production database)? Are there any 'side effect' as to Oracle may not support any problems it may create down the road? Or this is a perfectly safe operation to 'just do it' ? If so, what type of 'risks' it might have? I would like to more about it. Thanks, - Kirti -Original Message- From: TIL-TEC [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 11:51 AM To: Multiple recipients of list ORACLE-L Subject: Re:Renaming a column Hessu, In Oracle 8i renamimg of a column is possible. Otherwise there is a roundabout method . As sys user you have to first find out your object's id from obj$ table . And then change the column name from col$ table by giving the object id . It is risky be careful . First you can try on test database . Reply. -- neena -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: TIL-TEC INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Deshpande, Kirti INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a column
Been there, done it. It's dangerous. Don't ever do it. I was lucky and was able to reverse the changes. I know and Oracle instructor who was not so lucky and lost a database. I've heard of other people doing this and it worked properly. It's usually a bad idea to mess with the data dictionary unless instructed to do so by OWS. Jared On Wed, 14 Feb 2001, Deshpande, Kirti wrote: Have you personally done this in your test database (and may be in your production database)? Are there any 'side effect' as to Oracle may not support any problems it may create down the road? Or this is a perfectly safe operation to 'just do it' ? If so, what type of 'risks' it might have? I would like to more about it. Thanks, - Kirti -Original Message- From: TIL-TEC [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 11:51 AM To: Multiple recipients of list ORACLE-L Subject:Re:Renaming a column Hessu, In Oracle 8i renamimg of a column is possible. Otherwise there is a roundabout method . As sys user you have to first find out your object's id from obj$ table . And then change the column name from col$ table by giving the object id . It is risky be careful . First you can try on test database . Reply. -- neena -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: TIL-TEC INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Deshpande, Kirti INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a column
Hi Kirti, Assuming that your post was not "tongue in cheek", while I don't endorse the procedure, the Ixora web site has a note about a potential problem with doing this and how to work around it at http://www.ixora.com.au/q+a/dd.htm#31_08_1999. Please note the disclaimer there too. @ Regards, @ Steve Adams @ http://www.ixora.com.au/ @ http://www.christianity.net.au/ -Original Message- Sent: Thursday, 15 February 2001 4:27 To: Multiple recipients of list ORACLE-L Have you personally done this in your test database (and may be in your production database)? Are there any 'side effect' as to Oracle may not support any problems it may create down the road? Or this is a perfectly safe operation to 'just do it' ? If so, what type of 'risks' it might have? I would like to more about it. Thanks, - Kirti -Original Message- From: TIL-TEC [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 11:51 AM To: Multiple recipients of list ORACLE-L Subject: Re:Renaming a column Hessu, In Oracle 8i renamimg of a column is possible. Otherwise there is a roundabout method . As sys user you have to first find out your object's id from obj$ table . And then change the column name from col$ table by giving the object id . It is risky be careful . First you can try on test database . Reply. -- neena -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steve Adams INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a column
Hi Steve, Well, it was. I just wanted to see, if the person(s) suggesting such "ideas" have gone through any consequences of such "techniques". Since I noticed that there were a few postings suggesting it. I have read what's on your site and personally played with such "black magic" myself in my test database. I do not endorse it either. Thanks. - Kirti -Original Message- From: Steve Adams [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 3:36 PM To: Multiple recipients of list ORACLE-L Subject: RE: Renaming a column Hi Kirti, Assuming that your post was not "tongue in cheek", while I don't endorse the procedure, the Ixora web site has a note about a potential problem with doing this and how to work around it at http://www.ixora.com.au/q+a/dd.htm#31_08_1999. Please note the disclaimer there too. @ Regards, @ Steve Adams @ http://www.ixora.com.au/ @ http://www.christianity.net.au/ -Original Message- Sent: Thursday, 15 February 2001 4:27 To: Multiple recipients of list ORACLE-L Have you personally done this in your test database (and may be in your production database)? Are there any 'side effect' as to Oracle may not support any problems it may create down the road? Or this is a perfectly safe operation to 'just do it' ? If so, what type of 'risks' it might have? I would like to more about it. Thanks, - Kirti -Original Message- From: TIL-TEC [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 11:51 AM To: Multiple recipients of list ORACLE-L Subject:Re:Renaming a column Hessu, In Oracle 8i renamimg of a column is possible. Otherwise there is a roundabout method . As sys user you have to first find out your object's id from obj$ table . And then change the column name from col$ table by giving the object id . It is risky be careful . First you can try on test database . Reply. -- neena -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steve Adams INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Deshpande, Kirti INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Renaming a Column
Hessu, One of the ways: create table newtable (newcolumn1,newcolumn2,newcolumn3,...) as select * from oldtable ; rename newtable to oldtable; HTH Suhen Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Suhen Pather INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
Re: Renaming a Column
CREATE THE TABLE AGAIN WITH AS SELECT CLAUSE.. SELECTING ONLY COLUMN DEFINITION WHILE SUPPLYING THE NEW COLUMN NAME URSELF. apply constraints if any. reinsert the data from old table. drop old table . rename new table as old one. - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Wednesday, February 14, 2001 10:30 AM Hi all, I need to rename some columns on my table. Any idea how to do that... Thanks in advance, Hessu _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Heikki Jantunen INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Saurabh Sharma INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).