Re: a very primitive question about division - Mailing list pgsql-general

From David G. Johnston
Subject Re: a very primitive question about division
Date
Msg-id CAKFQuwZw9t9g1cC7gbdNom+oU7BNtPn3atQYFFRoAsnGLMa+YA@mail.gmail.com
Whole thread Raw
In response to a very primitive question about division  (Martin Mueller <martinmueller@northwestern.edu>)
Responses Re: a very primitive question about division
List pgsql-general
On Wed, Mar 7, 2018 at 10:21 AM, Martin Mueller <martinmueller@northwestern.edu> wrote:

Given two values defined as integers, how do I divide one by the other and get an answer with two decimals, e.g 3 /4 = 0.75.


​Case one of them to numeric.

​select 3/4::numeric
​David J.​

pgsql-general by date:

Previous
From: Martin Mueller
Date:
Subject: a very primitive question about division
Next
From: Martin Mueller
Date:
Subject: Re: a very primitive question about division