On 30 Nov 2016, at 3:26pm, Werner Kleiner <sqlitetes...@gmail.com> wrote:

> <<<No such thing as decimal(7,4) in SQLite.
> 
> In sqlite studio you can configure a column a decimal(7,4) .
> but anyway, how can you store a price like 1.500 with numeric type?

<https://www.sqlite.org/datatype3.html>

Declare it as REAL.

However, if you’re handling an amount you think of as rounded to three places, 
then you should probably be storing INTEGERs, and the database should hold your 
amounts multiplied by a thousand.  This gets rid of rounding problems if you 
expect SQLite to do any mathematics with your values (e.g. total() or ORDER BY).

If all you want from SQLite is to store and retrieve your values you could 
store them as TEXT without problems, and that way you can have commas in them.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to