Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    25

    Unanswered: Number type for currency

    does mysql have an equivalent to Oracle's NUMBER(6,2) ?
    for example: NUMBER(5,2) can output 12000.40
    it will round to the hundredth

    in mysql whats the best type to store currency type digits, like: 80.99 Im thinking of using Decimal. Im really unsure. would anyone like to help me out on this one

  2. #2
    Join Date
    Sep 2004
    Posts
    39
    Hi

    I would use decimal.

    As for rounding say you need to round 123456 / 999 to the hundreth I would do

    round(123456 / 999 *100) /100

    You should get 123.58

    Have fun
    One line at a time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •