phantom007 — 2013-03-27T00:40:53-04:00 — #1
I have the value 9223372036854775807 in a bigint datatype field and am trying to increment the value but it does not increment greater than the above value.
So can someone please suggest me the solution or tell me which datatype should i use that will support me a value greater than 9223372036854775807?
CREATE TABLE `log_counter` (
`log_counter` BIGINT(20) DEFAULT '0'
) ENGINE=MYISAM DEFAULT CHARSET=latin1
r937 — 2013-03-27T02:10:56-04:00 — #2
that's because this is the maximum number for a signed bigint
change the table so that this column is defined with UNSIGNED and you can then go twice as high, to 18446744073709551615
phantom007 — 2013-03-27T02:44:18-04:00 — #3
What does unsigned mean?
r937 — 2013-03-27T07:37:16-04:00 — #4
it means negative numbers are not permitted
please see http://en.wikipedia.org/wiki/Two's_complement