sql - Use Group By for real or float column with specify precision -


how can specify precision column of real type (eg. 3 digits after decimal point) group by clause?

eg. 12.023006 equal 12.023007 3 digits precision after decimal point , should grouped group by.

a couple ways can achieve this, 1 of cast field appropriate precision:

select cast(somecol decimal(10,3)) sometable group cast(somecol decimal(10,3)) 

you use round function achieve this.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -