Signed and unsigned inter datatype with it’s storage range

Uncategorized 0 Comment 6

Bigint :

Signed range: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)

Unsigned range: 2^64-1 (0 to 18,446,744,073,709,551,615)

Size: 8 bytes

Int :

Signed range: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)

Unsigned range: 232 – 1 (0 to 4,294,967,295)

Size: 4 bytes

Smallint :

Signed range: -2^15 (-32,768) to 2^15-1 (32,767)

Unsigned range: 2^16 –1 (0 to 65,53)

Size: 2 bytes

Tinyint :

Signed range:  − (27) to 27 – 1 (-128 to 127)

Unsigned range: 28 − 1 (0 to 255)

Size: 1 bytes

Leave a comment

You must be logged in to post a comment.

© 2016 4frienz. Powered By Flowers

Back to Top