Friday , November 22 2024

PostgreSQL String Functions

In today’s article, we will discuss the most used textual functions for String operations in PostgreSQL.

ASCII(): Returns numeric value of left-most character

BIT_LENGTH(): Returns length of argument in bits

CHAR_LENGTH(): Returns number of characters in argument

CHARACTER_LENGTH(): A synonym for CHAR_LENGTH()

CONCAT_WS(): Returns concatenate with separator

CONCAT(): Returns concatenated string

LEFT(): Returns the leftmost number of characters as specified

LENGTH(): Returns the length of a string in bytes

LOWER(): Returns the argument in lowercase

LTRIM(): Removes leading spaces

REPEAT(): Repeats a string the specified number of times

REPLACE(): Replaces occurrences of a specified string

REVERSE(): Reverse the characters in a string

RIGHT(): Returns the specified rightmost number of characters

RTRIM(): Removes trailing spaces

SUBSTRING(), SUBSTR(): Returns the substring as specified

TRIM(): Removes leading and trailing spaces

UPPER(): Converts to uppercase

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *