Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part 2: SQL Statements and Functions > String Functions - Pg. 235

String Functions 11 MySQL has several built-in functions for formatting, manipulating, and analyzing strings, both user-specified and within columns of data. This chapter lists these string functions, provides the syntax of each, and gives examples of their use. The examples in this chapter use a fictitious database for a college. String functions do not change their inputs; the functions' return values contain the changes. String Functions Grouped by Type The list of string functions is quite long, but many perform similar roles. The fol- lowing list groups the functions by these roles. Character Sets and Collation CHARSET() , COALESCE( ) , COERCIBILITY( ) , COLLATION() . Converting ASCII() , BIN() , BINARY , CAST( ) , CHAR( ) , COMPRESS() , CONVERT() , EXPORT_SET() , HEX() , MAKE_SET() , ORD( ) , SOUNDEX( ) , UNCOMPRESS( ) , UNHEX() . Formatting CONCAT() , CONCAT_WS( ) , LCASE( ) , LENGTH( ) , LOWER() , LPAD() , LTRIM() , OC- TET_LENGTH() , QUOTE( ) , RPAD( ) , RTRIM( ) , SPACE( ) , TRIM() , UCASE() , UPPER() . 235