Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7499915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:59:02+00:00 2026-05-29T19:59:02+00:00

Currently I have a column that is declared as a NUMBER. I want to

  • 0

Currently I have a column that is declared as a NUMBER. I want to change the precision of the column to NUMBER(14,2).

SO, I ran the command

 alter table EVAPP_FEES modify AMOUNT NUMBER(14,2)'

for which, I got an error :

   column to be modified must be empty to decrease precision or scale

I am guessing it wants the column to be empty while it changes the precision and I don’t know why it says we want to decrease it while we are increasing it, the data in the columns can’t be lost. Is there a short workaround for this? I don’t want to copy it into another table and drop it afterwards, or rename a column and copy in between columns, because there is a risk of losing data between the transfers and drops.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:59:03+00:00Added an answer on May 29, 2026 at 7:59 pm

    Assuming that you didn’t set a precision initially, it’s assumed to be the maximum (38). You’re reducing the precision because you’re changing it from 38 to 14.

    The easiest way to handle this is to rename the column, copy the data over, then drop the original column:

    alter table EVAPP_FEES rename column AMOUNT to AMOUNT_OLD;
    
    alter table EVAPP_FEES add AMOUNT NUMBER(14,2);
    
    update EVAPP_FEES set AMOUNT = AMOUNT_OLD;
    
    alter table EVAPP_FEES drop column AMOUNT_OLD;
    

    If you really want to retain the column ordering, you can move the data twice instead:

    alter table EVAPP_FEES add AMOUNT_TEMP NUMBER(14,2);
    
    update EVAPP_FEES set AMOUNT_TEMP = AMOUNT;
    
    update EVAPP_FEES set AMOUNT = null;
    
    alter table EVAPP_FEES modify AMOUNT NUMBER(14,2);
    
    update EVAPP_FEES set AMOUNT = AMOUNT_TEMP;
    
    alter table EVAPP_FEES drop column AMOUNT_TEMP;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a table with an id column that is being autoincremented and
Currently I have a User table that has a toys_owned column that is an
currently we have a column with only integer values declared as NUMBER. At the
Currently I have an address column that is an embedded document in my users
I currently have a varchar(255) column that stores the path to a small image
I currently have a Postgres 8.4 database that contains a varchar(10000) column. I'd like
I currently have a table which only has a single editable column. I have
I have an application in which I'm currently using a two column table in
I currently have a table that is 17 columns wide and has 30 records.
Currently I have a table that I search upon 4 fields, FirstName, LastName, MiddleName,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.