Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Posts
    153

    Unanswered: how to use datatype 'money' ?

    i went through the postgresql documentation where i saw the use of money datatype that is for monetary types. iam not getting exactly how to use it. please let me know guys.

    explaination with an example would be better.



    Thanks,
    sunny
    Last edited by sunny_007; 09-28-10 at 03:18. Reason: .

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    I would recommend to use numeric instead of money.

    But there is no magic on how to use the money datatype, just use it as any other type:
    Code:
    create table product_price 
    (
       product_id integer not null,
       price money not null
    );
    But as I said, I'd recommend numeric

  3. #3
    Join Date
    Sep 2010
    Posts
    153

    Smile thanks shammat

    i had created teh table using money datatype but i am saying what kind of values does it holds. suppose if i give -92233720368547758.08 to +92233720368547758.07, it won't take. what kind of values will it take?


    thanks

  4. #4
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by sunny_007 View Post
    iwhat kind of values will it take
    http://www.postgresql.org/docs/current/static/datatype-money.html

Posting Permissions

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