a very primitive question about division

Поиск
Список
Период
Сортировка
От Martin Mueller
Тема a very primitive question about division
Дата
Msg-id 411898BB-F429-4654-88B6-F172185DB096@northwestern.edu
обсуждение исходный текст
Ответы Re: a very primitive question about division
Список pgsql-general

I have a very primitive question about division to which I can’t find an obvious answer in the documentation.

 

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.

 

This is very simple in mysql and seems to be oddly contorted in postgres. I spent half an hour on the Web and with the documentation but couldn’t find a simple example.

 

Probably my stupidity.

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Help troubleshooting SubtransControlLock problems
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: a very primitive question about division