views:

375

answers:

2

Say I'm inserting a 64 bit floating point double into a DECIMAL(17,5) field. Does the value get rounded or truncated?

A: 

Why don't you just try it out?

Welcome to StackOverflow! Please read http://meta.stackoverflow.com/questions/16353 to understand how/why we treat newbie questions the way we do.
Eric
+3  A: 

It rounds:

select cast(9.12345 as decimal(10,4))

Returns 9.1235

Eric
Good test. You could also create a temp table to test it out.
Esteban Araya
@Esteban: I suppose you could, but I'm lazy.
Eric