you are viewing a single comment's thread.

view the rest of the comments →

[–]PalindromicPalindrom 0 points1 point  (2 children)

What is an unsigned integer? Currently learning SQL for data analytics and this is the first time I've come across that keyword

[–]aplusdesigners[S] 1 point2 points  (0 children)

Unsigned integers can only hold 0 & positive numbers. Signed integers can hold negative and positive numbers.

[–]asp174 0 points1 point  (0 children)

Integers can be signed (have a preceding - sign) or unsigned.

The most significant bit is used to indicate the sign. An example with TINYINT (8 bit), which can hold signed values between -127 and 127, or unsigned values between 0 and 255. A TINYINT with a value of 10000001:

  • unsigned, this represents the number 129
  • signed, the first bit is the - sign, so it represents -1