How to convert a string to int type in mysql: You can use the Convert() method to convert, such as [SELECT CONVERT("2017-08-29", DATE);].
#You can use the Convert (field name, type) method to perform conversion.
(Recommended tutorial: mysql video tutorial)
Grammar format:
SELECT CONVERT(filedName, UNSIGNED INTEGER) ;
Example:
SELECT CONVERT("2017-08-29", DATE);
Commonly used conversion types
Related recommendations: php training
The above is the detailed content of How to convert string to int type in mysql. For more information, please follow other related articles on the PHP Chinese website!