[mysql] replace usage (replace part of the content of a field) [mysql] replace usage 1. replace into
2.replace(object,search,replace)
3.UPDATE updates part of the content in a field
Knowledge point expansion: mysql replace function replace() implements mysql to replace the string in the specified field MySQL replace string implementation method: The replace function in MySQL directly replaces a specific string in a field in the MySQL database. You no longer need to write your own function to replace it, which is very convenient to use. mysql replace function replace() UPDATE `table_name` SET `field_name` = replace (`field_name`,'from_str','to_str') WHERE `field_name` LIKE '%from_str%' illustrate: table_name - the name of the table field_name —— field name from_str - the string to be replaced to_str —— the string to be replaced For example:
This function is multi-byte safe, which means you don't have to consider whether it is Chinese characters or English characters. Summarize This is the end of this article about mysql replace field part and mysql replace function replace(). For more relevant mysql replace field content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: This article takes you into the world of js data types and data structures
>>: Summary of ten Linux command aliases that can improve efficiency
Table of contents 1. Environmental Preparation 2....
1: What is openssl? What is its function? What is...
Table of contents 1. What is Ts 2. Basic Grammar ...
Table of contents Preface MySQL master-slave repl...
Table of contents Preface: 1. Concept 2. The bene...
Our veteran predecessors have written countless c...
First, let me briefly introduce what MySQL is; In...
The semantics, writing style, and best practices ...
This article example shares the specific code for...
Table of contents 1. Basic Use 2. Working Princip...
Table of contents Vue routing relative path jump ...
In Linux system, both chmod and chown commands ca...
Achieve results Implementation ideas The melting ...
Table of contents Preface 1. cat command: 2. more...
Preface Starting from MySQL 5.7.11, MySQL support...