Esteban Araya
Esteban Araya

Reputation: 29664

Does SQL Server round or truncate?

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

Upvotes: 3

Views: 2461

Answers (1)

Eric
Eric

Reputation: 95123

It rounds:

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

Returns 9.1235

Upvotes: 5

Related Questions