TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

MySQL

MySQL TRIM Function

Overview

In this tutorial, we will learn about MySQL TRIM function with some examples. This function removes the trim character/string from the beginning or at the end of the given string.

Syntax

The general syntax of the function is as follows:

TRIM([LEADING | TRAILING | BOTH <trim_string> FROM ] <string>)

Examples

mysql> SELECT TRIM(‘ MySQL Tutorials ‘);
+—————————————————+
| TRIM(‘ MySQL Tutorials ‘) |
+—————————————————+
| MySQL Tutorials |
+—————————————————+
1 row in set (0.00 sec)

mysql> SELECT TRIM(LEADING ‘a’ FROM ‘aaaaMySQL Tutorials’);
+———————————————-+
| TRIM(LEADING ‘a’ FROM ‘aaaaMySQL Tutorials’) |
+———————————————-+
| MySQL Tutorials |
+———————————————-+
1 row in set (0.01 sec)

 

MySQL TRIM Function Example

—

MySQL Tutorials

MySQL Tutorials on this website:

https://www.testingdocs.com/mysql-tutorials-for-beginners/

For more information on MySQL Database:

https://www.mysql.com/

Related Posts

MySQL Workbench Windows 11

MySQL /

New MySQL Connection in Workbench

MySQL Command-line Client

MySQL /

Command-Line MySQL Client

Start MySQL Client

MySQL /

Start MySQL Client on Windows 11

Windows 11 Services Run Prompt

MySQL /

Start MySQL Server on Windows 11

MySQL Community Downloads TDocs

MySQL /

Download & Install MySQL on Windows 11

‹ MySQL Numeric Functions› MySQL Trigonometry Functions

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle
  • Draw Parallel Lines using Flowgorithm Graphics

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version