Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A sql statement in sqlserver to get the number of Chinese characters in a string

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "the sql sentence to get the number of Chinese characters in a string in sqlserver". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the "sql sentence to get the number of Chinese characters in a string in sqlserver".

The principle is actually very simple, knowledge 1, length function len (), knowledge 2, or length function datalength ()

The code is as follows:

Declare @ sql varchar (1000) set @ sql='abc MJI de d e people f'select @ sql characters, DATALENGTH (@ sql)-len (@ sql) the number of Chinese characters so far, I believe that "sqlserver to get the number of Chinese characters in the string sql sentence" have a deeper understanding, might as well to practice it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report