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

  • Home
  • SEARCH
  • 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 494717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:31:24+00:00 2026-05-13T05:31:24+00:00

What is the reason that some people from Oracle background are using DECIMAL(31,0) for

  • 0

What is the reason that some people from Oracle background are using DECIMAL(31,0) for integers. In MySQL it is not efficient.

  • 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-13T05:31:24+00:00Added an answer on May 13, 2026 at 5:31 am

    Oracle implements the “INTEGER” ANSI datatype as a synonym for NUMBER(38)

    For more details see “Learn Oracle: Datatypes for SQL and PL/SQL, Numbers“

    However, the following table should be used as a mapping between datatype in Oracle and MySQL:

    “Oracle® Database SQL Developer Supplementary Information for MySQL Migrations”

    Oracle and MySQL Compared > Data Types > Comparing Data Types

    The main difference, as explained here and here is that Oracle NUMBER datatype is variable-length format while MySQL DECIMAL(n) datatype used to be represented as strings that require one byte per digit or sign character (before version 5.0.3)

    (Oracle NUMBER Datatype) Internal Numeric Format

    Oracle Database stores numeric data in
    variable-length format. Each value is
    stored in scientific notation, with 1
    byte used to store the exponent and up
    to 20 bytes to store the mantissa. The
    resulting value is limited to 38
    digits of precision. Oracle Database
    does not store leading and trailing
    zeros. For example, the number 412 is
    stored in a format similar to 4.12 x
    102, with 1 byte used to store the
    exponent(2) and 2 bytes used to store
    the three significant digits of the
    mantissa(4,1,2). Negative numbers
    include the sign in their length.

    Taking this into account, the column
    size in bytes for a particular numeric
    data value NUMBER(p), where p is the
    precision of a given value, can be
    calculated using the following
    formula:

    ROUND((length(p)+s)/2))+1

    where s equals zero if the number is
    positive, and s equals 1 if the number
    is negative.

    Zero and positive and negative
    infinity (only generated on import
    from Oracle Database, Version 5) are
    stored using unique representations.
    Zero and negative infinity each
    require 1 byte; positive infinity
    requires 2 bytes.

    and

    (MySQL) DECIMAL Data Type Changes

    The storage requirements for the
    integer and fractional parts of each
    value are determined separately. Each
    multiple of nine digits requires four
    bytes, and any remaining digits left
    over require some fraction of four
    bytes. […]

    For example, a DECIMAL(18,9) column
    has nine digits on either side of the
    decimal point, so the integer part and
    the fractional part each require four
    bytes. A DECIMAL(20,6) column has
    fourteen integer digits and six
    fractional digits. The integer digits
    require four bytes for nine of the
    digits and three bytes for the
    remaining five digits. The six
    fractional digits require three bytes.

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

Sidebar

Related Questions

Let's say that for some reason you need to write a macro: MACRO(X,Y) .
Can I simply use if(myString == nil) For some reason a string that I
For some reason the Windows command prompt is special in that you have to
For some reason one installation of Moodle 1.9.3+ has a problem that file.php returns
I have some forms that communicate with server using AJAX for real reasons: cascade
I need advice regarding subselect performance in MySQL. For a reason that I can't
I was working on a project that missbehaved, for some reasons no exception was
Is there a specific reason that the EF requires new data providers and can't
Is there any (technical) reason that C# requires all generic type parameters to be
I'm thinking that the reason I can't do this is because it might be

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.