- Tags: MySQL
- Categories: Reference, SQL Reference, SQL Resources
Quick Reference
This is a quick reference list of MySQL string functions and how they are used to work with databases.
SQL – MySQL ASCII() Function
The MySQL ASCII() function returns the ASCII value for the specific character.
SQL – MySQL CHAR_LENGTH() Function
The MySQL CHAR_LENGTH() function returns the length of a string in characters.
SQL – MySQL CHARACTER_LENGTH() Function
The MySQL CHARACTER_LENGTH() function returns the length of a string in characters.
SQL – MySQL CONCAT() Function
The MySQL CONCAT() function adds two or more expressions together.
SQL – MySQL CONCAT_WS() Function
The MySQL CONCAT_WS() function adds two or more expressions together using a separator.
SQL – MySQL FIELD() Function
The MySQL FIELD() function returns the index position of a case-insensitive value in a list of values.
SQL – MySQL FIND_IN_SET() Function
The MySQL FIND_IN_SET() function returns the position of a string within a list of strings.
SQL – MySQL FORMAT() Function
The MySQL FORMAT() function formats a number to a format like “#,###,###.##”, rounded to a specified number of decimal places, and returns it as a string.
SQL – MySQL INSERT() Function
The MySQL INSERT() function inserts a string within a string at the specified position and for a certain number of characters.
SQL – MySQL INSTR() Function
The MySQL INSTR() function returns the position of the first occurrence of a case-insensitive string in another string.
SQL – MySQL LCASE() Function
The MySQL LCASE() function converts a string to lower-case.
SQL – MySQL LEFT() Function
The MySQL LEFT() function extracts a number of characters from a string, starting from left.
SQL – MySQL LENGTH() Function
The MySQL LENGTH() function returns the length of a string in bytes.
SQL – MySQL LOCATE() Function
The MySQL LOCATE() function returns the position of the first occurrence of a case-insensitive substring in a string.
SQL – MySQL LOWER() Function
The MySQL LOWER() function converts a string to lower case.
SQL – MySQL LPAD() Function
The MySQL LPAD() function left-pads a string with another string, to achieve a specified length.
SQL – MySQL LTRIM() Function
The MySQL LTRIM() function removes leading spaces from a string.
SQL – MySQL MID() Function
The MySQL MID() function extracts a substring from a string, starting at any position from the beginning or end of the string.
SQL – MySQL POSITION() Function
The MySQL POSITION() function returns the position of the first occurrence of a case-insensitive substring in a string.
SQL – MySQL REPEAT() Function
The MySQL REPEAT() function repeats a string as many times as specified.
SQL – MySQL REPLACE() Function
The MySQL REPLACE() function replaces all case-sensitive occurrences of a substring within a string, with a new substring.
SQL – MySQL REVERSE() Function
The MySQL REVERSE() function reverses a string and returns the result.
SQL – MySQL RIGHT() Function
The MySQL RIGHT() function extracts a number of characters from a string, starting from right.
SQL – MySQL RPAD() Function
The MySQL RPAD() function right-pads a string with another string, to achieve a specified length.
SQL – MySQL RTRIM() Function
The MySQL RTRIM() function removes trailing spaces from a string.
SQL – MySQL SPACE() Function
The MySQL SPACE() function returns a string of the specified number of space characters.
SQL – MySQL STRCMP() Function
The MySQL STRCMP() function compares the lengths two strings.
SQL – MySQL SUBSTR() Function
The MySQL SUBSTR() function extracts a substring from a string, starting from any position.
SQL – MySQL SUBSTRING() Function
The MySQL SUBSTRING() function extracts a substring from a string, starting from any position.
SQL – MySQL SUBSTRING_INDEX() Function
The MySQL SUBSTRING_INDEX() function returns a substring of a string before a specified number of delimiter occurs.
SQL – MySQL TRIM() Function
The MySQL TRIM() function removes leading and trailing spaces from a string.
SQL – MySQL UCASE() Function
The MySQL UCASE() function converts a string to upper case.
SQL – MySQL UPPER() Function
The MySQL UPPER() function converts a string to upper case.
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
Why 1SMARTchicken?
See More →
Thanks for your support!
SQL Books
All are affiliate links. Thank you for your support!
SQL NOTES:
- Any work being done to modify the structure of a database or delete tables or the the database itself should only be done after making a recent backup
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.