简体   繁体   中英

What is maximum auto_increment value on DOUBLE column?

MySQL allows an auto_increment definition on a DOUBLE column.

What is the maximum allowed value for this auto_increment column?

SQLFiddle: http://sqlfiddle.com/#!9/9be033/1

Double has a range which is -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308.

That being said, it is usually recommended to use INT or BIGINT or SMALLINT( whole number ) when you are using auto_increment . Using double for auto_increment will not be a very good idea since you have to take care of double precision value in that case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM