Re: Best data type to use for sales tax percent
От
Merlin Moncure
Тема
Re: Best data type to use for sales tax percent
Дата
Msg-id
b42b73150910081638h42e09fa4j9ee9ef4be3e34ece@mail.gmail.com
Ответ на
Best data type to use for sales tax percent (Mike Christensen)
Список
Дерево обсуждения
Re: Best data type to use for sales tax percent Jasen Betts <jasen@xnet.co.nz>
Re: Best data type to use for sales tax percent "Roderick A. Anderson" <raanders@cyber-office.net>
Re: Best data type to use for sales tax percent Christophe Pettus <xof@thebuild.com>
Re: Best data type to use for sales tax percent Steve Crawford <scrawford@pinpointresearch.com>
Re: Best data type to use for sales tax percent Peter Geoghegan <peter.geoghegan86@gmail.com>
On Thu, Oct 8, 2009 at 6:04 PM, Mike Christensen wrote: > (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! numeric(2,3) is not possible :-). IMO, a percentage should be stored numeric(6,3) or so. That gives up to 100% down to thousandth of a percent. merlin
В списке pgsql-general по дате отправления