SQL > SQL String Functions

In this section, we cover common string functions seen in SQL. Different RDBMS may employ different string functions, and there may also be differences in the syntax for each RDBMS even when the function call is the same. All such differences are explained in each section. Please note that we do not list all possible SQL string functions in this tutorial. Rather, the most commonly used ones are covered.

SQL String FunctionDescription
CASTConverts data from one data type to another.
CONVERTConverts data from one data type to another.
CONCATENATECombines the results of several columns together.
SUBSTRINGReturns a portion of a string.
INSTRFinds the starting location of a pattern in a string.
TRIMRemoves specified prefix or suffix from a string. The most common pattern being removed is white space.
LENGTHReturns the length of a string.
REPLACEUpdates the content of a string.
TO_DATEConverts a string to a date.




Copyright © 2016   1keydata.com   All Rights Reserved     Privacy Policy     About   Contact