Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 27th, 2005, 02:45 AM
Ach Ach is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 46 Ach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 36 m 29 sec
Reputation Power: 4
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!

Reply With Quote
  #2  
Old June 27th, 2005, 01:04 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 2 m 57 sec
Reputation Power: 48
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.

Reply With Quote
  #3  
Old June 28th, 2005, 05:28 AM
Ach Ach is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 46 Ach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 36 m 29 sec
Reputation Power: 4
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Change columns datatype and order


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway