Friday, March 30, 2012

Numeric/Decimal datatype

Hi,
Is there any difference between the Decimal and Numeric data type? I am
converting an Oracle Numeric data type (using precision and scale) to
SQLServer and need to know if they are identical, is one there just for
backward compatibility etc.
Thanks for any help.> Is there any difference between the Decimal and Numeric data type?
They are functionally equivalent.
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||In ANSI SQL, for DECIMAL, you can get higher precision than what you asked f
or. For NUMERIC, you
should get what you ask for.
In SQL Server, they are identical, you get what you ask for for both datatyp
es.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ClaireB" <ClaireB@.discussions.microsoft.com> wrote in message
news:0291C14E-C9DD-4B95-8095-77B408927262@.microsoft.com...
> Hi,
> Is there any difference between the Decimal and Numeric data type? I am
> converting an Oracle Numeric data type (using precision and scale) to
> SQLServer and need to know if they are identical, is one there just for
> backward compatibility etc.
> Thanks for any help.
>|||Thanks for your help. NUMERIC it is then...
Claire
"Tibor Karaszi" wrote:

> In ANSI SQL, for DECIMAL, you can get higher precision than what you asked
for. For NUMERIC, you
> should get what you ask for.
> In SQL Server, they are identical, you get what you ask for for both datat
ypes.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "ClaireB" <ClaireB@.discussions.microsoft.com> wrote in message
> news:0291C14E-C9DD-4B95-8095-77B408927262@.microsoft.com...
>
>

No comments:

Post a Comment