How big can a 64bit signed integer be?

后端 未结 3 361
悲哀的现实
悲哀的现实 2020-12-29 21:03

In redis,

The range of values supported by HINCRBY is limited to 64 bit signed integers.

And I\'d like to know how big can t

3条回答
  •  攒了一身酷
    2020-12-29 21:33

        Formula   
    
        2^(n-1) is the formula of the maximum value of a Bigint data type.
    
        In the preceding formula N is the size of the data type. The ^ operator calculates the power of the value.
    
        Now determine the value of N in Bit:
    
    Select (max_length * 8) as 'Bit(s)' from sys.types Where name = 'BIGInt'
    =64 Bits
    

    Range:: -9223372036854775808 to 9223372036854775807

提交回复
热议问题