当前位置:网站首页>MySQL winter vacation self-study 2022 12 (3)
MySQL winter vacation self-study 2022 12 (3)
2022-07-03 04:35:00 【Crane paper thousand】
-- String function
-- 1, Get the number of string characters
select char_length('hello '); #6 The space is also called
select char_length(' how are you '); #3 Chinese characters count as
-- charactr_length and char_length The same function
-- length Take the length , The units returned are bytes
select length('hello '); #6
select length(' how are you '); #9 UTF-8 In the encoding , Chinese characters take up three bytes
-- 2, String merge
select concat('hello','world','scx');
-- Specify delimiters for string merging
select concat_ws('-','hello','world');
-- 3, Returns the position where the string first appears in the list
select field('aaa','aaa','bbb','ccc'); #1
select field('bbb','aaa','bbb','ccc'); #2
select field('ddd','aaa','bbb','ccc'); #0, Not found
-- 4, Remove the space to the left of the string
select ltrim(' abcd ');
-- Remove the space on the right
select rtrim(' abcd ');
-- Remove the blanks at both ends , The middle string cannot be removed
select trim(' abcd ');
-- 5, String interception
select mid('helloworld',2,3);# Intercept three characters from the second position , The length is 3
-- 6, Get string a In string b Where in , Which one you see first returns which
select position('abc' in 'helloabcworld');#6
select position('abc' in 'habcelloabcworld');#2
-- 7, String substitution , If I have two aaa Replace them all
select replace('helloaaaworld','aaa','bbb');#hellobbbworld
select replace('aaahelloaaaworld','aaa','bbb');#bbbhellobbbworld
-- 8, String inversion
select reverse('hello');#olleh
边栏推荐
- [set theory] binary relationship (special relationship type | empty relationship | identity relationship | global relationship | divisive relationship | size relationship)
- I've been in software testing for 8 years and worked as a test leader for 3 years. I can also be a programmer if I'm not a professional
- [set theory] set identities (idempotent law | exchange law | combination law | distribution rate | De Morgan law | absorption rate | zero law | identity | exclusion law | contradiction law | complemen
- SSM based campus part-time platform for College Students
- What's wrong with SD card data damage? How to recover SD card data damage
- 关于开学的准备与专业认知
- Kingbasees plug-in KDB of Jincang database_ date_ function
- [BMZCTF-pwn] 20-secret_ file
- After job hopping at the end of the year, I interviewed more than 30 companies in two weeks and finally landed
- [BMZCTF-pwn] 18-RCTF-2017-Recho
猜你喜欢

Some information about the developer environment in Chengdu

2022 new examination questions for the main principals of hazardous chemical business units and examination skills for the main principals of hazardous chemical business units

Introduction to JVM principle

Know that Chuangyu cloud monitoring - scanv Max update: Ecology OA unauthorized server request forgery and other two vulnerabilities can be detected

Internationalization and localization, dark mode and dark mode in compose

Small sample target detection network with attention RPN and multi relationship detector (provide source code, data and download)
![[fxcg] inflation differences will still lead to the differentiation of monetary policies in various countries](/img/56/386f0fd6553b8b9711e14c54705ae3.jpg)
[fxcg] inflation differences will still lead to the differentiation of monetary policies in various countries

FFMpeg filter

Jincang KFS data bidirectional synchronization scenario deployment

stm32逆向入门
随机推荐
[set theory] binary relationship (definition field | value field | inverse operation | inverse synthesis operation | restriction | image | single root | single value | nature of synthesis operation)
C Primer Plus Chapter 10, question 14 3 × 5 array
Kingbasees plug-in KDB of Jincang database_ database_ link
Kubernetes源码分析(一)
General undergraduate college life pit avoidance Guide
Wine travel Jianghu War: Ctrip is strong, meituan is strong, and Tiktok is fighting
2022 Shandong Province safety officer C certificate examination content and Shandong Province safety officer C certificate examination questions and analysis
IPhone x forgot the boot password
Function introduction of member points mall system
Auman Galaxy new year of the tiger appreciation meeting was held in Beijing - won the double certification of "intelligent safety" and "efficient performance" of China Automotive Research Institute
Why should programmers learn microservice architecture if they want to enter a large factory?
[free completion] development of course guidance platform (source code +lunwen)
Jincang KFS data bidirectional synchronization scenario deployment
带有注意力RPN和多关系检测器的小样本目标检测网络(提供源码和数据及下载)...
Mongodb slow query optimization analysis strategy
Some information about the developer environment in Chengdu
What's wrong with SD card data damage? How to recover SD card data damage
[BMZCTF-pwn] 18-RCTF-2017-Recho
2022 tea master (intermediate) examination questions and tea master (intermediate) examination skills
C primre plus Chapter 10 question 6 inverted array