For example is it possible to ensure that a particular number field is always rounded to exactly three decimal places?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. Define the column as
DECIMAL(16, 3)– see the postgres documentation for this typeThe first number (16 in this case) is the maximum total number of digits in the number, the second number (3 in this case) is the number of decimal places.
Every database (I know of) supports this datatype.