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
 CAST Converts data from one data type to another.
 CONVERT Converts data from one data type to another.
 CONCATENATE Combines the results of several columns together.
 SUBSTRING Returns a portion of a string.
 INSTR Finds the starting location of a pattern in a string.
 TRIM Removes specified prefix or suffix from a string. The most common pattern being removed is white space.
 LENGTH Returns the length of a string.
 REPLACE Updates the content of a string.
 TO_DATE Converts a string to a date.

This page was last updated on June 05, 2022.




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