Home > Database > Mysql Tutorial > body text

How to convert string to int type in mysql

王林
Release: 2020-09-27 14:04:13
Original
22376 people have browsed it

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);].

How to convert string to int type in mysql

#You can use the Convert (field name, type) method to perform conversion.

(Recommended tutorial: mysql video tutorial)

Grammar format:

SELECT CONVERT(filedName, UNSIGNED INTEGER) ;
Copy after login

Example:

SELECT CONVERT("2017-08-29", DATE);
Copy after login

Commonly used conversion types

How to convert string to int type in mysql

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template