Link to home
Start Free TrialLog in
Avatar of thomaszhwang
thomaszhwangFlag for United States of America

asked on

Swap and drop in Oracle Database

I want to alter the data type for one column in a big table w/ billions of rows and using range partition.  I don't want to lock the table, so I suppose I can only create a new table w/ the new data type for that column and copy the data over and drop the old table.  Is this a correct assumption?  Also if I want to copy a range partitioned table, what would be the most efficient way to do this?  Thanks.
SOLUTION
Avatar of ggzfab
ggzfab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thomaszhwang

ASKER

@ggzfab I'm new to Oracle and I cannot understand how views can help here.  Could you please explain a little bit more?
@sdstuber Can you give me more information?  Is this package an external package I need to install?  How can I actually use this package?  Thanks.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks sdstuber.  I just want to change the data type for one column from varchar2(2000) to nvarchar2(2000).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I will test this out tomorrow and let you know if I encounter any issue.  I will leave this ticket open for now.  Thanks sdstuber.
Thanks.