SlideShare a Scribd company logo
1 of 4
MySQL String Functions
Function Description
ASCII Returns the ASCII value for the specific
character
CHAR_LENGTH Returns the length of a string (in characters)
CHARACTER_LENGTH Returns the length of a string (in characters)
CONCAT Adds two or more expressions together
CONCAT_WS Adds two or more expressions together with a
separator
FIELD Returns the index position of a value in a list of
values
FIND_IN_SET Returns the position of a string within a list of
strings
FORMAT Formats a number to a format like
"#,###,###.##", rounded to a specified
number of decimal places
INSERT Inserts a string within a string at the specified
position and for a certain number of characters
INSTR Returns the position of the first occurrence of a
string in another string
LCASE Converts a string to lower-case
LEFT Extracts a number of characters from a string
(starting from left)
LENGTH Returns the length of a string (in bytes)
LOCATE Returns the position of the first occurrence of a
substring in a string
LOWER Converts a string to lower-case
LPAD Left-pads a string with another string, to a
certain length
LTRIM Removes leading spaces from a string
MID Extracts a substring from a string (starting at
any position)
POSITION Returns the position of the first occurrence of a
substring in a string
REPEAT Repeats a string as many times as specified
REPLACE Replaces all occurrences of a substring within a
string, with a new substring
REVERSE Reverses a string and returns the result
RIGHT Extracts a number of characters from a string
(starting from right)
RPAD Right-pads a string with another string, to a
certain length
RTRIM Removes trailing spaces from a string
SPACE Returns a string of the specified number of
space characters
STRCMP Compares two strings
SUBSTR Extracts a substring from a string (starting at
any position)
SUBSTRING Extracts a substring from a string (starting at
any position)
SUBSTRING_INDEX Returns a substring of a string before a
specified number of delimiter occurs
TRIM Removes leading and trailing spaces from a
string
UCASE Converts a string to upper-case
UPPER Converts a string to upper-case

More Related Content

Similar to MySQL String Functions.docx

SQL select statement and functions
SQL select statement and functionsSQL select statement and functions
SQL select statement and functions
Vikas Gupta
 
String and string buffer
String and string bufferString and string buffer
String and string buffer
kamal kotecha
 

Similar to MySQL String Functions.docx (20)

Character function in MySQL | Oracle
Character function in MySQL | OracleCharacter function in MySQL | Oracle
Character function in MySQL | Oracle
 
Built-in Functions in SQL | Numeric Functions
Built-in Functions in SQL | Numeric FunctionsBuilt-in Functions in SQL | Numeric Functions
Built-in Functions in SQL | Numeric Functions
 
String functions
String functionsString functions
String functions
 
Mysql1
Mysql1Mysql1
Mysql1
 
Regular expressions in oracle
Regular expressions in oracleRegular expressions in oracle
Regular expressions in oracle
 
Regular Expressions 101 Introduction to Regular Expressions
Regular Expressions 101 Introduction to Regular ExpressionsRegular Expressions 101 Introduction to Regular Expressions
Regular Expressions 101 Introduction to Regular Expressions
 
C# chap 10
C# chap 10C# chap 10
C# chap 10
 
PHP Web Programming
PHP Web ProgrammingPHP Web Programming
PHP Web Programming
 
SQL select statement and functions
SQL select statement and functionsSQL select statement and functions
SQL select statement and functions
 
Python strings
Python stringsPython strings
Python strings
 
String and string buffer
String and string bufferString and string buffer
String and string buffer
 
The Ring programming language version 1.10 book - Part 126 of 212
The Ring programming language version 1.10 book - Part 126 of 212The Ring programming language version 1.10 book - Part 126 of 212
The Ring programming language version 1.10 book - Part 126 of 212
 
vbscripting
vbscriptingvbscripting
vbscripting
 
13string in c#
13string in c#13string in c#
13string in c#
 
stringstringbuilderstringbuffer-190830060142.pptx
stringstringbuilderstringbuffer-190830060142.pptxstringstringbuilderstringbuffer-190830060142.pptx
stringstringbuilderstringbuffer-190830060142.pptx
 
M C6java7
M C6java7M C6java7
M C6java7
 
Variables In Php 1
Variables In Php 1Variables In Php 1
Variables In Php 1
 
Python regular expressions
Python regular expressionsPython regular expressions
Python regular expressions
 
Squirrel do more_with_less_code_light_cheatsheet
Squirrel do more_with_less_code_light_cheatsheetSquirrel do more_with_less_code_light_cheatsheet
Squirrel do more_with_less_code_light_cheatsheet
 
Squirrel do more_with_less_code_cheat_sheet_1
Squirrel do more_with_less_code_cheat_sheet_1Squirrel do more_with_less_code_cheat_sheet_1
Squirrel do more_with_less_code_cheat_sheet_1
 

More from RUBAB79

More from RUBAB79 (14)

Database.docx
Database.docxDatabase.docx
Database.docx
 
RDBMS.docx
RDBMS.docxRDBMS.docx
RDBMS.docx
 
Difference between RDBMS and DBMS.docx
Difference between RDBMS and DBMS.docxDifference between RDBMS and DBMS.docx
Difference between RDBMS and DBMS.docx
 
SQL Keywords and Functions.pptx
SQL Keywords and Functions.pptxSQL Keywords and Functions.pptx
SQL Keywords and Functions.pptx
 
Ms Access 1.pptx
Ms Access 1.pptxMs Access 1.pptx
Ms Access 1.pptx
 
Lecture 4-RDBMS.pptx
Lecture 4-RDBMS.pptxLecture 4-RDBMS.pptx
Lecture 4-RDBMS.pptx
 
SQL Introduction.pptx
SQL Introduction.pptxSQL Introduction.pptx
SQL Introduction.pptx
 
SQL Operators.pptx
SQL Operators.pptxSQL Operators.pptx
SQL Operators.pptx
 
SQL Commands Part 1.pptx
SQL Commands Part 1.pptxSQL Commands Part 1.pptx
SQL Commands Part 1.pptx
 
Database Lecture 3.pptx
Database Lecture 3.pptxDatabase Lecture 3.pptx
Database Lecture 3.pptx
 
SQL Conversion Functions.pptx
SQL Conversion Functions.pptxSQL Conversion Functions.pptx
SQL Conversion Functions.pptx
 
SQL Commands Part 3.pptx
SQL Commands Part 3.pptxSQL Commands Part 3.pptx
SQL Commands Part 3.pptx
 
SQL Commands Part 2.pptx
SQL Commands Part 2.pptxSQL Commands Part 2.pptx
SQL Commands Part 2.pptx
 
DATABASE Lecture 1 and 2.pptx
DATABASE Lecture 1 and 2.pptxDATABASE Lecture 1 and 2.pptx
DATABASE Lecture 1 and 2.pptx
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 

MySQL String Functions.docx

  • 1. MySQL String Functions Function Description ASCII Returns the ASCII value for the specific character CHAR_LENGTH Returns the length of a string (in characters) CHARACTER_LENGTH Returns the length of a string (in characters) CONCAT Adds two or more expressions together CONCAT_WS Adds two or more expressions together with a separator FIELD Returns the index position of a value in a list of values FIND_IN_SET Returns the position of a string within a list of strings FORMAT Formats a number to a format like "#,###,###.##", rounded to a specified number of decimal places
  • 2. INSERT Inserts a string within a string at the specified position and for a certain number of characters INSTR Returns the position of the first occurrence of a string in another string LCASE Converts a string to lower-case LEFT Extracts a number of characters from a string (starting from left) LENGTH Returns the length of a string (in bytes) LOCATE Returns the position of the first occurrence of a substring in a string LOWER Converts a string to lower-case LPAD Left-pads a string with another string, to a certain length LTRIM Removes leading spaces from a string MID Extracts a substring from a string (starting at any position)
  • 3. POSITION Returns the position of the first occurrence of a substring in a string REPEAT Repeats a string as many times as specified REPLACE Replaces all occurrences of a substring within a string, with a new substring REVERSE Reverses a string and returns the result RIGHT Extracts a number of characters from a string (starting from right) RPAD Right-pads a string with another string, to a certain length RTRIM Removes trailing spaces from a string SPACE Returns a string of the specified number of space characters STRCMP Compares two strings SUBSTR Extracts a substring from a string (starting at any position)
  • 4. SUBSTRING Extracts a substring from a string (starting at any position) SUBSTRING_INDEX Returns a substring of a string before a specified number of delimiter occurs TRIM Removes leading and trailing spaces from a string UCASE Converts a string to upper-case UPPER Converts a string to upper-case