I need an integer number that bigger than 0 (1-65535)
Is there any mysql type or attribute like unsigned, but without 0 values?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No there is not. There are 5 different types of integers (6 if you include enum). The closest you can get is
SMALLINT(0-65535).http://dev.mysql.com/doc/refman/5.5/en/integer-types.html
These are the unsigned values of the integers types.
As mentioned in the comments, you create a small int and add a trigger that will check to see if you inserted a 0.