In an Oracle database, trim is generally used to delete spaces on both sides of a string. In fact, trim can also be used to delete specified characters on both sides of a string. And trim specifies that the deleted string can only be a single
The Oracle trim function is a very common function, and the syntax of the Oracle trim function is described in detail below, hoping to give you a deeper understanding of the Oracle trim function.
If you mention the Oracle Trim function, the
LTRIM, RTrim, and trim usage in Oracle:1, LTRIM (C1,C2)where C1 and C2 can be strings, for example C1 is ' Miss Liu ', C2 ' MISL ' and so on. This is the first place that is not the same as SQL Server. If you remember good, SQL Server's LTrim has
1. Take a look at the complete syntax description of the Oracle Trim functionTRIM ([{{leading | TRAILING | BOTH}[Trim_character]| Trim_character}From]Trim_source)The above syntax is quoted from Oracle 10GR2 official documentation:
The Trim function in the program is known to all, but in SQL, only LTRIM is required. RTRIM deletes the left and right blank characters instead of the specified characters, so we can write one by ourselves.Requirements:1. The front and back spaces
There are two kinds of functions in this function:the first, that is, everyone is more familiar with the removal of space. Example:--trim to remove spaces before and after a specified charactersql> SELECT TRIM (' DD DF ') from dual;TRIM (' Dddf ')---
Trim,ltrim,rtrim function usage in OracleTrim,ltrim,rtrim function usage in OracleThere are two kinds of functions in this function:the first, that is, everyone is more familiar with the removal of space. Example:--trim to remove spaces before and
Oracle trim, ltrim, rtrim function usageThis function has two functions:First, remove spaces that everyone is familiar.Example:-- Trim removes leading and trailing spaces of a specified characterSQL> select trim ('dd df') from dual;Trim ('dddf ')----
Original: "SQL" a reliable trim function, a bonus processSQL has LTrim and RTrim These two functions are used to remove the first and trailing whitespace of the string, the absence of common trim functions can be removed at the same time, and the
No matter whether you are a newbie to SQL, you should be a beginner in the data warehousing industry who needs to review SQL. This SQL textbook website lists commonly used SQL commands. This website contains the following parts:-SQL commands: How
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.