Home » SQL & PL/SQL » SQL & PL/SQL » Datatype Issue (Oracle, 10g, WindowsXP)
Datatype Issue [message #444372] Sun, 21 February 2010 04:27 Go to next message
saleh_binmasood
Messages: 30
Registered: October 2009
Member
I have a table which have almost 90000 rows.

1. The datatype of some columns is NVARCHAR2. I want to change it to VARCHAR2 and NUMBER for some

How to do so ?
Re: Datatype Issue [message #444374 is a reply to message #444372] Sun, 21 February 2010 04:35 Go to previous messageGo to next message
John Watson
Messages: 6581
Registered: January 2010
Location: Global Village
Senior Member
DBMS_REDEFINITION should do what you want.
Re: Datatype Issue [message #444375 is a reply to message #444372] Sun, 21 February 2010 04:38 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Of course some data in NVARCHAR2 columns might be inconvertible to VARCHAR2.

Regards
Michel
Re: Datatype Issue [message #444377 is a reply to message #444375] Sun, 21 February 2010 04:42 Go to previous messageGo to next message
saleh_binmasood
Messages: 30
Registered: October 2009
Member
can you please explore that or give the exact syntax.

Thanks a lot
Re: Datatype Issue [message #444379 is a reply to message #444377] Sun, 21 February 2010 04:56 Go to previous messageGo to next message
John Watson
Messages: 6581
Registered: January 2010
Location: Global Village
Senior Member
The routine is described in chapter 15 of your 10g Administrator's Guide. If you post the script you use, it may help other people.
Re: Datatype Issue [message #444380 is a reply to message #444377] Sun, 21 February 2010 05:44 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
saleh_binmasood wrote on Sun, 21 February 2010 11:42
can you please explore that or give the exact syntax.

Can YOU please explore that and come back if you are stuck.
Here are the first steps:
- Database Administrator's Guide, Chapter 15 Managing Tables, Section Redefining Tables Online
- Database PL/SQL Packages and Types Reference, DBMS_REDEFINITION

Documentation is of great help but only if you have a look at it.

Regards
Michel

[Updated on: Sun, 21 February 2010 05:45]

Report message to a moderator

Previous Topic: Using OF Pl/sql table of Records
Next Topic: Full outer join
Goto Forum:
  


Current Time: Sat Dec 10 16:57:54 CST 2016

Total time taken to generate the page: 0.07499 seconds