MySQL LTRIM() Function17 Mar 2025 | 1 min read LTRIM(str) is a Sring function of MySQL. This method returns string by removing leading space. SyntaxExample 1Output: ![]() Example 2Output: ![]() Next TopicMySQL String |
MySQL FIELD() Function Field(str,str1,str2,str3,....) is a Sring function of MySQL. This method returns the index of string. Syntax select field(str,str1,str2,str3,...) Example 1 Selct field('a','b','c','d','a'); Output: Example 2 Selct field(4,1,2,3,5,4,6); Output: Example 3 Selct field(12,1,2,3,4,6); Output: TopicMySQL String ...
1 min read
MySQL UCASE() Function The ucase() is a String function of MySQL. This function returns the string in upper case. Syntax select ucase(str) Parameter: str: string to be convert Example 1 Select ucase('javatpoint'); Output: Example 2 Select ucase('mysql'); Output: TopicMySQL String ...
1 min read
MySQL CHARACTER_LENGTH() Function Character_Length (str) function is a Sring function of MySQL. This method is same as char_length() function which returns size of given string. Syntax select character_length(str); Example 1 select character_length('javatpoint'); Output: Example 2 select character_length('mysql'); Output: TopicMySQL String ...
1 min read
MySQL SPACE() Function The space() is a String function of MySQL. This function returns the given number (n) of blank spaces. Syntax select space(n); Parameters: N: number of spaces to be returned. Returns This function returns a string with a specified number of spaces. Example 1 select space(5); Output: Example 2 select space(10); Output: TopicMySQL String ...
1 min read
MySQL LCASE() Function LCASE(str) is a Sring function of MySQL. This method returns string in lower case. Syntax select lcase('JAVATPOINT'); Example 1 select lcase('JAVATPOINT'); Output: Example 2 select lcase('MY SQL STRING FUNCTION'); Output: TopicMySQL String ...
1 min read
MySQL HEX(str), HEX(N) Function Hex() is a Sring function of MySQL. This method return in hexadecimal string of given number or String. Syntax select hex(S or N) Example 1 Select hex('a'); Output: Example 2 Select hex('b'); Output: Example 3 Select hex('c'); Output: TopicMySQL String ...
1 min read
MySQL Trim() Function The trim() is a String function of MySQL. This function removes the blank spaces from the head and tail of the given string. Syntax TRIM( [ LEADING | TRAILING | BOTH ] [ trim_character FROM ] string ) Parameter: str: string to be trimmed leading: it removes blank spaces...
1 min read
MySQL LENGTH() Function LENGTH(str) is a Sring function of MySQL. This method returns length of the given string ?str? which is measured in bytes. Syntax select LENGTH(str); Example 1 select length('Javatpoint'); Output: Example 2 select length('MY SQL STRING FUNCTION'); Output: TopicMySQL String ...
1 min read
MySQL SUBSTR() Function The substr() is a String function of MySQL. This function returns the substring from the given string. Syntax select substr(Str, pos); Select substr(Str from pos); Select substr(Str, pos, len); Select substr(Str from pos for len); Parameter: Str: Main string Len: length for substring Pos: position the start the substring from the given string. Example...
1 min read
MySQL ELT() Function Elt() function is a Sring function of MySQL. This method Nth element from the list of string. Syntax select elt(N,str1,str2,str3,...) Example 1 select elt(3,'this','is','javatpoint','website') Output: Example 2 select elt(4,'my','sql','string','function') Output: TopicMySQL String ...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India