MySQL database technology (10) [group chart] _ MySQL

Source: Internet
Author: User
MySQL database technology (10) [group chart] 2.4 expression evaluation and type conversion

MySQL allows you to write expressions that include constants, function calls, and table column references. These values can be combined using different types of operators, such as arithmetic operators or comparison operators. The expression items can be grouped by parentheses. The expression appears most frequently in the SELECT statement column selection list and WHERE clause, as shown below:

Each selected column provides an expression, as shown in the WHERE clause. The expression also appears in the WHERE clause of the DELETE and u p d ate statements, and in the VALUES () clause of the I N S E RT statement.

When MySQL encounters an expression, it evaluates it to get the result. For example, (4*3)/(4-2) is worth 6. Expression evaluate may involve type conversion. For example, when MySQL is used in 960821 for an environment that requires a date value, convert it to the date "1 9 9 6-0 8-2 1 ". This section describes how to compile MySQL expressions and the type conversion rules used by MySQL in expression evaluation. Every MySQL operator has been introduced, but MySQL has so many functions that we have only touched on. For more information about each operator and function, see Appendix C.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.