dave.morris at metagrid.co.uk
Wed Jul 6 11:44:25 CEST 2016
On 2016-07-06 09:49, Marco Molinaro wrote:
> I indeed think it is (R)DBMS implementation dependent, maybe one more
> point to check with Dave's Cosmopterix.
> A quick search in the SQL standard discussions online seems to point
> that A%B=R is valid with R having the same sign as A and ABS(R) being
> smaller than ABS(B), plus the counter check that A=B*K+R where K is
> integer value (out of A/B).
Tested with PostgreSQL, MySQL, MariaDB, Apache Derby, HyperSQL and
All of them behave as above, for mod(A,B) then R has the same sign as A,
irrespective of the sign of B.
Wide Field Astronomy Unit
Institute for Astronomy
University of Edinburgh
More information about the dal