|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Change columns datatype and order
Hi all,
In fact I have two questions! 1.How to change a columns data type without making that column empty? 2.How to change the order of columns in a table? for the 2nd one,I know I can create a new table and do "select into" and... but I am curious about another way! ![]() |
|
#2
|
|||
|
|||
|
1. see the alter table command
2. Normally this makes no sense in Oracle. It desn't care about the "order" of columns for most things, it's not like Access. Your "select into" choice is about as good as it gets. You can also use sqlldr, - spool the output of select * to a table, drop the table, create a new one, write a .ctl file for sqlldr, then run sqlldr --- but it is much less efficient. |
|
#3
|
|||
|
|||
|
Thanks.
Just for emphasize: Not Oracle nor any other RDBMS which asserts is built on Relational Theory SHOULD care about order of columns.I don't know much about Access. A table (named Relation in RDM) is a math set and as we all know the order of columns or elements in a set does not matter. It was just for curiosity and I hope did not mislead anybody. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Change columns datatype and order |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|