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

    Stellar Converter for Database Tool

    MySQL /

    Stellar Converter for Database

    Stellar MySQL Log Analyzer

    MySQL /

    Stellar Log Analyzer for MySQL

    Stellar Repair for MySQL

    MySQL /

    Stellar Repair for MySQL

    MySQL /

    How to secure your SQL Database: Tips and Tricks

    Stellar Converter for Database

    MySQL /

    Database Converter Tools

    ‹ MySQL Numeric Functions› MySQL Trigonometry Functions

    Recent Posts

    • ChatGPT Subscription Plans
    • Stellar Converter for Database
    • Stellar Log Analyzer for MySQL
    • Stellar Repair for MySQL
    • ChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI Features
    • Shaping the Future of Development: Exploring Key Trends in Software Engineering
    • Improving Java Performance with Multithreading
    • Open-source Vector Databases

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com