Home » SQL & PL/SQL » SQL & PL/SQL » Changing Data Types
Changing Data Types [message #2278] Wed, 03 July 2002 08:46 Go to next message
spencer
Messages: 2
Registered: July 2002
Junior Member
Is it possible to change a field from NUMERIC 10,0 to NUMERIC 5,0 . Will this adversely affect the data already in the table or does Oracle v8. restructure the table with the data in place ?

Thanks..
Re: Changing Data Types [message #2279 is a reply to message #2278] Wed, 03 July 2002 09:28 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
change the column it must be empty to decrease precision or scale.
but you can increase the precision with data in it.
Re: Changing Data Types [message #2284 is a reply to message #2278] Wed, 03 July 2002 10:41 Go to previous message
spencer
Messages: 2
Registered: July 2002
Junior Member
This wasn't necessarily an accuracy issue. The data being read from the field is two bytes too long for my program. A 16bit number is adequate for what I need, my understanding was that the change to numeric 5,0 only requires 2 bytes rather than 4 for numeric 10,0. I assume from your answer that it will only work when going from 5,0 --> 10,0 otherwise the table must be empty to go 10,0 --> 5,0

Thanks..
Previous Topic: Average of dates
Next Topic: SQL Query (should be pretty easy ;-)
Goto Forum:
  


Current Time: Thu Apr 25 16:38:25 CDT 2024