Replace, concat, and cast character string functions in mysql need to export a personal information of job-seeking users. This information requires three-table joint query requirements: birthdate format: 1990.01.02 Database: Gender display: men and
Original: http://www.2cto.com/database/201310/250880.htmlSQL cast and CONVERT usage detailed Summary: The following applies only to Mysqlselect {fn CONCAT (CONVERT (User_id,char), user_name)} as Str from T_SYS_ User following this applies only to
The MYSQL Cast function is a very important MYSQL function. The following describes the syntax and usage of the MYSQL Cast function in detail, hoping that you can have a better understanding of the MYSQL Cast function.
BINARYThe BINARY operator
First, the CONVERT functionCharacter Set conversions: convert (XXX USING gb2312) type conversions are the same as SQL Server, but differ on type parameters: CAST (xxx as type), convert (XXX, type), type must be of the following type:Available type
In mysql, if I use common data sorting methods, we may not get the expected results, but mysql provides us with the CAST CONVERT function, which can CONVERT numbers accordingly, I used this function to sort Chinese characters in the past.
Let's
MySQL's cast () and CONVERT () functions can be used to get a value of one type and produce a value of another type. The specific syntax for both is as follows:
1
CAST(value astype);
2
MySQL's cast () and CONVERT () functions can be used to get a value of one type and produce a value of another type. The specific syntax for both is as follows:View Source print?
1
CAST(value astype);
MySQL's cast () and CONVERT () functions can be used to get a value of one type and produce a value of another type. The specific syntax for both is as follows:CAST (value as type); CONVERT (value, type);is cast (xxx as type), CONVERT (XXX,
Mysql varchar sorting CAST, CONVERT function type conversion, varcharconvert
When creating a table on your own, you should create a field type as varchar (2). In fact, it should be set as integer (2). But today, we found a Sorting Problem in the
MySQL's cast () and CONVERT () functions can be used to get a value of one type and produce a value of another type. The specific syntax for both is as follows:CAST (value as type); CONVERT (value, type);is cast (xxx as type), CONVERT (XXX,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.