9

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?

  • 3
    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
  • @vonPryz The calculation of modular multiplicative inverses for the generation of asymmetric keys is one thing that comes to my mind. It can be used to create a reversible 'randomization' of bigint numbers, for example. – Arthur Castro Oct 4 '19 at 13:40
17

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;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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