Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

SQL character function

character function

A character or string function is a function which takes one or more characters or numbers as parameters and returns a character value. Basic string functions offer a number of capabilities and return a string value as a result set.

SQL character functions are:

Functions Description
lower() The SQL LOWER() function is used to convert all characters of a string to lower case.
upper() The SQL UPPER() function is used to convert all characters of a string to uppercase.
trim() The SQL TRIM() removes leading and trailing characters(or both) from a character string.
translate() The SQL TRANSLATE() function replaces a sequence of characters in a string with another sequence of characters. The function replaces a single character at a time.

Here is a new document which is a collection of questions with short and simple answers, useful for learning SQL as well as for interviews.

Practice SQL Exercises

Want to improve the above article? Contribute your Notes/Comments/Examples through Disqus.

Previous: SQRT
Next: Character Function LOWER



SQL: Tips of the Day

SQL Server SELECT into existing table.

INSERT INTO dbo.TABLETWO
SELECT col1, col2
  FROM dbo.TABLEONE
 WHERE col3 LIKE @search_key

This assumes there's only two columns in dbo.TABLETWO - you need to specify the columns otherwise:

INSERT INTO dbo.TABLETWO
  (col1, col2)
SELECT col1, col2
  FROM dbo.TABLEONE
 WHERE col3 LIKE @search_key

Database: SQL Server

Ref: https://bit.ly/3y6tpA3