Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to use dataype which can hold more than 19 digits. So is there any datatype available which can hold larger than 19 digits?

share|improve this question
1  
Out of curiosity, what kind of problem needs to deal with values in quintillion range? Scientific computing comes into mind. –  vonPryz Oct 15 '13 at 13:16

1 Answer 1

up vote 8 down vote accepted

Numeric/Decimal, Float/Real. There's a great answer here, some official documentation here and here, and I also posted a few opinions ages ago, but here is a quick demonstration:

-- overflow error:

DECLARE @x BIGINT        = 9999999999999999999;

GO

-- works:

DECLARE @x DECIMAL(38,0) = 99999999999999999999999999999999999999;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.