LENGTH() Function in Oracle

In Oracle, the LENGTH() function returns the length of its argument.

LENGTH() can also be thought of as a group of functions. There are five separate functions; LENGTH(), LENGTHB(), LENGTHC(), LENGTH2(), and LENGTH4(). Each function calculates the length in a different way.

Read more

INSTR() Function in Oracle

In Oracle, the INSTR() function searches for a substring in a given string, and returns an integer indicating the position of the first character of this substring. If the substring isn’t found, the function returns 0.

INSTR() requires at least two arguments; the string, and the substring. It also accepts an optional third and fourth arguments that allows you to specify the starting position to search, and which occurrence to search for.

INSTR() can also be thought of as a group of functions. There are five separate functions; INSTR(), INSTRB(), INSTRC(), INSTR2(), and INSTR4(). Each function calculates the length in a different way.

Read more

RPAD() Function in Oracle

In Oracle, the RPAD() function allows you to pad the right part of a string with a certain character, to a specified number of characters.

The way it works is, you specify how long the resulting string should be. If the original string is shorter, the padding character fills in the remaining space.

Read more