Introduction
These functions help you find how long a text is and where a smaller text appears inside a bigger text.
LENGTH(string)
POSITION(substring IN string)SELECT LENGTH('Hello World');
SELECT POSITION('World' IN 'Hello World');
SELECT LENGTH('');
SELECT POSITION('x' IN 'abc');
SELECT LENGTH('Database') AS length_of_word, POSITION('base' IN 'Database') AS position_of_substring;
LENGTH function do in PostgreSQL?SELECT POSITION('day' IN 'holiday') AS pos, LENGTH('holiday') AS len;SELECT POSITION('test', 'contest') AS pos;Pass the test and this pattern moves unknown