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 7429143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:55:21+00:00 2026-05-29T08:55:21+00:00

I have a huge data table (200+ million records) which stores cash amounts for

  • 0

I have a huge data table (200+ million records) which stores cash amounts for which we are using the Money datatype. I need to increase the precision of this field to 8 or so decimal points.

Now I could simply go

ALTER TABLE CashTable ALTER COLUMN Cash decimal(23,8) null

I would like to know though if anyone has an idea of how this will perform, and whether there is any risk of loss of data.

Thanks

  • 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-29T08:55:22+00:00Added an answer on May 29, 2026 at 8:55 am

    Behind the scenes this will add a new fixed length column to each row so if you need to do this as an online operation in order to keep the locking overhead down and to reduce the transaction size if I were you I would simply do this explicitly.

    ALTER TABLE CashTable ADD COLUMN Cash2 decimal(23,8) null
    

    Then add an INSERT and UPDATE trigger to keep Cash2 synched with the Cash column and update the new column in batches.

    When the whole table is synched drop the original column and rename the new one. Hopefully you don’t have any code dependant upon column ordinal order.

    There is no risk of data loss as this can cope with the range of money fine (-922,337,203,685,477.5808 to 922,337,203,685,477.5807).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table with huge data( say millions of records, its just a
Updated I have some huge data, which becomes a large table say table parent
I have a tag table with a huge data. I need to make an
I have jsp page which diplays a huge data in table format in the
I have a table which contains huge data. I want to add hibernate automatic
I have a huge table in my database (MySQL)with millions of data. I need
I have a scripts that retrieves huge data on a table. I want to
I have a huge database that has several tables that hold several million records.
I have a huge table full of records and with PHP I'm making a
I have a huge table, which has 3 columns and about 333,000 rows. The

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.