Best data type to use for sales tax percent

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Best data type to use for sales tax percent
Date: 2009-10-08 22:04:35
Message-ID: 7aa638e00910081504q4addc085ya30bdf58d6aa4ff@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

(Sorry for the super-easy question)

I want to store sales tax (as a percent) in the DB, such as 9.5%.
What's the best data type for this? I'm guessing numeric(2,3) should
be fine, yes? I'm not too familiar with the numeric type (I was using
"real" before), but as I understand the data will be stored using the
necessary number of bits on the disk? Thanks!

Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2009-10-08 22:36:45 Re: Best data type to use for sales tax percent
Previous Message Alvaro Herrera 2009-10-08 21:09:06 Re: Query inside RTF