863
Chapter 12. Functions and Operators
Table of Contents
12.1. Function and Operator Reference ..................................................................................... 864
12.2. Type Conversion in Expression Evaluation ........................................................................ 871
12.3. Operators ......................................................................................................................... 872
12.3.1. Operator Precedence ............................................................................................. 873
12.3.2. Comparison Functions and Operators ..................................................................... 874
12.3.3. Logical Operators .................................................................................................. 880
12.3.4. Assignment Operators ............................................................................................ 881
12.4. Control Flow Functions ..................................................................................................... 882
12.5. String Functions ............................................................................................................... 884
12.5.1. String Comparison Functions .................................................................................. 895
12.5.2. Regular Expressions .............................................................................................. 899
12.6. Numeric Functions and Operators ..................................................................................... 904
12.6.1. Arithmetic Operators .............................................................................................. 905
12.6.2. Mathematical Functions .......................................................................................... 907
12.7. Date and Time Functions .................................................................................................. 915
12.8. What Calendar Is Used By MySQL? ................................................................................. 934
12.9. Full-Text Search Functions ............................................................................................... 934
12.9.1. Natural Language Full-Text Searches ..................................................................... 935
12.9.2. Boolean Full-Text Searches ................................................................................... 938
12.9.3. Full-Text Searches with Query Expansion ............................................................... 940
12.9.4. Full-Text Stopwords ............................................................................................... 941
12.9.5. Full-Text Restrictions ............................................................................................. 944
12.9.6. Fine-Tuning MySQL Full-Text Search ..................................................................... 944
12.9.7. Adding a Collation for Full-Text Indexing ................................................................. 946
12.10. Cast Functions and Operators ......................................................................................... 948
12.11. Bit Functions .................................................................................................................. 950
12.12. Encryption and Compression Functions ........................................................................... 952
12.13. Information Functions ...................................................................................................... 957
12.14. Miscellaneous Functions ................................................................................................. 964
12.15. Functions and Modifiers for Use with
GROUP BY
Clauses ................................................. 968
12.15.1.
GROUP BY
(Aggregate) Functions ........................................................................ 968
12.15.2.
GROUP BY
Modifiers ............................................................................................ 972
12.15.3. MySQL Extensions to
GROUP BY
......................................................................... 975
12.16. Spatial Extensions .......................................................................................................... 976
12.16.1. Introduction to MySQL Spatial Support .................................................................. 976
12.16.2. The OpenGIS Geometry Model ............................................................................ 977
12.16.3. Supported Spatial Data Formats ........................................................................... 983
12.16.4. Creating a Spatially Enabled MySQL Database ..................................................... 984
12.16.5. Spatial Analysis Functions .................................................................................... 989
12.16.6. Optimizing Spatial Analysis ................................................................................... 998
12.16.7. MySQL Conformance and Compatibility .............................................................. 1001
12.17. Precision Math .............................................................................................................. 1001
12.17.1. Types of Numeric Values ................................................................................... 1002
12.17.2.
DECIMAL
Data Type Changes ............................................................................ 1002
12.17.3. Expression Handling ........................................................................................... 1004
12.17.4. Rounding Behavior ............................................................................................. 1005
12.17.5. Precision Math Examples ................................................................................... 1006
Expressions can be used at several points in SQL statements, such as in the
ORDER BY
or
HAVING
clauses of
SELECT
statements, in the
WHERE
clause of a
SELECT
,
DELETE
, or
UPDATE
statement,
or in
SET
statements. Expressions can be written using literal values, column values,
NULL
, built-in
functions, stored functions, user-defined functions, and operators. This chapter describes the functions
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...