SQL String Functions

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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



Got any SQL Question?