سؤال

I have a field in my database table, type of: double

How can I store a value like this: 0,001 in it?

I've already tried, but it's truncated into 0,00.

هل كانت مفيدة؟

المحلول

You can set the number of decimal places as part of the table definition: colname double(4,3) allows one digit before the decimal and three digits after.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top