String or Text


To use any function, you need to modify your query so that you specify to which column or columns the function should be applied to.


ex.: 

  select Trim(client_name) from clients;


Function

Usage

LENGTH()

- returns the length of the string stored in the column

Length(column)

LEFT(), RIGHT()

- returns the leftmost x or rightmost x characters from a column 

Left(column, x)

Right(column, x)

UPPER(), LOWER(), SUBSTRING()

- turns the stored string into all Capitalized letters or all-lowercase format

- Substring, returns length characters from column beginning with

  start(indexed from 0)

Upper(column)

Lower(column)

SubString(column, start, length)


  • CONCAT

This function joins or add up or connect two(2) or more string into one(1), see sample below:

ex.: 

    select concat(last_name,',',first_name) as names from Users