About 13,400,000 results
Open links in new tab
  1. SQL Server TRIM() Function - W3Schools

    The TRIM() function removes the space character OR other specified characters from the start or end of a string. By default, the TRIM() function removes leading and trailing spaces from a string. Note: Also look at the LTRIM() and RTRIM() functions.

  2. TRIM (Transact-SQL) - SQL Server | Microsoft Learn

    Sep 3, 2024 · By default, the TRIM function removes the space character from both the start and the end of the string. This behavior is equivalent to LTRIM(RTRIM(@string)).

  3. SQL TRIM Function - SQL Tutorial

    In SQL, the TRIM function allows you to remove specified characters from the start and end of a string. Here’s the syntax of the TRIM function: TRIM([LEADING | TRAILING | BOTH] characters FROM string); Code language: SQL (Structured Query Language) ( sql )

  4. SQL Server TRIM() Function By Practical Examples

    In this tutorial, you will learn how to use the SQL Server TRIM () function to remove spaces or specified characters from both sides of a string.

  5. SQL Remove Characters from String with Examples [SOLVED]

    Apr 30, 2023 · We will explore various techniques and built-in SQL functions that can help you efficiently eliminate specific characters or patterns from strings, allowing you to clean up and reformat data to meet your requirements.

  6. Manipulate Strings in SQL Server with REPLACE, TRIM, STUFF, …

    Mar 5, 2024 · When you need to remove leading or trailing spaces, consider adding one. Several RDMS offer them, including Oracle, MySQL, and PostgreSQL. You can also use these functions in combination with each other. -- Here I add two leading spaces. SELECT LTRIM(' That rug really tied the room together.'); -- Here I add two trailing spaces.

  7. SQL trim function - w3resource

    Jul 12, 2024 · Understanding the SQL TRIM() Function. The SQL TRIM() removes leading and trailing characters(or both) from a character string. The SQL `TRIM()` function is essential for data manipulation, allowing you to remove unwanted characters from strings.

  8. SQL TRIM() String Function - Syntax, Examples [4] - Tutorial Kart

    The SQL TRIM() function removes leading, trailing, or both leading and trailing spaces (or other specified characters) from a string. The TRIM() function is useful for cleaning up data by removing unnecessary whitespace or unwanted characters from text fields.

  9. How to Trim Strings in SQL - LearnSQL.com

    Use the TRIM function if you want to trim a string in a table. This function allows you to remove a specific character from the beginning or end of a string, or from both ends. This function takes the following arguments: An optional keyword specifying the ends from which to trim. Possible keywords are: BOTH (remove from the beginning and the end).

  10. SQL TRIM Function Use and Examples - MSSQLTips.com - SQL

    Nov 11, 2021 · Learn how to use the SQL Server TRIM function to remove leading and trailing spaces from a string.

Refresh