No rounding function that is built into a database product will likely give you 4.50 from 4.44. Basic rounding functions will give you 4.4. Apart from that, there should be a round() and trunc() function, where the truncate function never 'rounds up' but merely 'chops off'. The round() function would round 4.46 to 4.5 however, but I doubt it would add the 0 at the end.

I would suggest writing a user defined function to do what you want to do instead. It's a fairly simple function that would take two parameters, one for the precision to round to, the second for the precision to return from the function

float specialround(float input, int precision, int returnprecision)

Dealing with floats in databases can be dangerous though - and you may want to deal with numbers as integers (decimals) with a defined decimal place - where the database internally stores the numbers as '446' with a column definition of decimal(10,2), for example.

Floating point precision can end up screwing you if you don't handle the numbers carefully.

I would suggest writing a user defined function to do what you want to do instead. It's a fairly simple function that would take two parameters, one for the precision to round to, the second for the precision to return from the function

float specialround(float input, int precision, int returnprecision)

Dealing with floats in databases can be dangerous though - and you may want to deal with numbers as integers (decimals) with a defined decimal place - where the database internally stores the numbers as '446' with a column definition of decimal(10,2), for example.

Floating point precision can end up screwing you if you don't handle the numbers carefully.