SQLString Functions

Download SQL for free

Introduction

String functions perform operations on string values and return either numeric or string values.

Using string functions, you can, for example, combine data, extract a substring, compare strings, or convert a string to all uppercase or lowercase characters.

Syntax

  • CONCAT ( string_value1, string_value2 [, string_valueN ] )
  • LTRIM ( character_expression )
  • RTRIM ( character_expression )
  • SUBSTRING ( expression ,start , length )
  • ASCII ( character_expression )
  • REPLICATE ( string_expression ,integer_expression )
  • REVERSE ( string_expression )
  • UPPER ( character_expression )
  • TRIM ( [ characters FROM ] string )
  • STRING_SPLIT ( string , separator )
  • STUFF ( character_expression , start , length , replaceWith_expression )
  • REPLACE ( string_expression , string_pattern , string_replacement )

Remarks

String functions reference for Transact-SQL / Microsoft

String functions reference for MySQL

String functions reference for PostgreSQL

Related Examples

Concatenate