Maximum precision of numeric and decimal data types: 38


  

---A sample
---decimal(p,s)   make p+s<=38
declare @num1 decimal(24,14)=123.45678
declare @num2 decimal(24,14)=12.99

declare @Result decimal(24,14)

Select 123.45678/12.99

Select Cast(123.45678 as decimal(24,14))/Cast(12.99  as decimal(24,14) )

Select @num1/@num2

---https://msdn.microsoft.com/en-us/library/ms190476(v=sql.110).aspx
--https://msdn.microsoft.com/en-us/library/ms187746.aspx
--http://stackoverflow.com/questions/423925/t-sql-decimal-division-accuracy

 
Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s