In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to use STUFF in SQL? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
1. Function
Deletes characters of the specified length and inserts another set of characters at the specified starting point.
2. Grammar
STUFF (character_expression, start, length, character_expression)
3. Example
The following example creates and returns a string by deleting three characters from the second position (character b) in the first string abcdef and then inserting the second string at the beginning of the deletion
SELECT STUFF ('abcdef', 2,3,' ijklmn') GO
Here is the result set
Aijklmnef
4. Parameters
Character_expression
A character data expression. Character_expression can be a constant, a variable, a character column, or a binary data column.
Start
An integer value that specifies the start of deletions and inserts. If start or length is negative, an empty string is returned. If start is longer than the first character_expression, an empty string is returned. Start can be of type bigint.
Length
An integer that specifies the number of characters to delete. If the length is longer than the first character_expression, delete up to the last character in the last character_expression. Length can be of type bigint.
5. Return type
Returns character data if character_expression is a supported character data type. Returns binary data if character_expression is a supported binary data type.
6. Remarks
If the result value is greater than the maximum value supported by the return type, an error occurs.
This is the answer to the question about how to use STUFF in SQL. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.