MySQL: What is the meaning of Unsigned?
Question by Guest | 2012-06-26 at 08:11
When creating a new column in MySQL, I can also adjust the attributes to "Unsigned". What does this setting mean and are there any benefits to Unsigned columns?
Related Topics
Java: Declare unsigned Integer
Question | 2 Answers
MySQL: Change minimum word length for full text search
Tip | 1 Comment
MySQL: Integer Types
Info | 0 Comments
MySQL: CSV Export as File stored on the Server
Tutorial | 0 Comments
MySQL: CSV Export as automatic Download
Tutorial | 0 Comments
MySQL: Regular Expressions in MySQL queries
Info | 0 Comments
MySQL: Combine full text search with LIKE search for words with 3 letters
Tutorial | 2 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
The settings for Signed and Unsigned regulate, whether the values of the relevant column can also be negative. If you set a column to Signed, the values can be positive or negative (they can have a sign), in the other case, if you set it to Unsigned, only positive values and zero are possible.
The advantage is obvious: If you set the column to unsigned, much wider ranges of values are covered with the same memory requirements. So, if you expect large values, but no negative ones, possibly, you can use a smaller integer type using the attribute "Unsigned" and with this, you can save space.
What savings and value ranges with Signed and Unsigned columns exactly occur with each integer type, you can experience in my little info table on all MySQL integer types.
2012-06-26 at 18:26