Werner;

The data is stored as raw as it gets.  What you use to physically SEE that
data is presented by 'whatever it is you use'.  So SQLite3.exe is going to
present it one way, as close to as raw format as possible, in as
minimalistic  , while tools like SQLite Expert looks at the value types and
decides itself how to present the data.  The same deal is with MySQL.  It
presents the raw data to as raw as it gets.  The fact that you specify
decimal(7,4) tells the MySQL engine that the output should kinda look a
certain way.  It doesn't store the additional zeros, it presents them to
you that way.  It'll actually store the additional numbers beyond the 4th
decimal number, you just aren't given that.

What you're asking from the database is purely presentation and is entirely
based on whatever tool you're using to call up the data.  The tool you use
is going to be the deciding factor on how its displayed.

On top of that, SQLite3 isn't based on MySQL.  So you're going to see
different commands, logic and output.

On Wed, Nov 30, 2016 at 10:39 AM, Werner Kleiner <sqlitetes...@gmail.com>
wrote:

> << All you need to store in the database table is the number. How it is
> formatted for viewing or printing is controlled by the user interface.
>
> yes thats right, but it would be nice to have same behavior between
> MySQL and sqlite
> I think to use a char datatype is not a good solution.
>
> 2016-11-30 16:27 GMT+01:00 Rich Shepard <rshep...@appl-ecosys.com>:
> > On Wed, 30 Nov 2016, Igor Tandetnik wrote:
> >
> >> Store it as an integer, in $.0001 units. So $1.500 would be represented
> >> simply as an integer 1500.
> >
> >
> >   All you need to store in the database table is the number. How it is
> > formatted for viewing or printing is controlled by the user interface.
> >
> > Rich
> >
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to