MySQL gets the Pinyin initials of Chinese characters

1, Function Here is to obtain the Pinyin initial of Chinese characters through function call. DELIMITER $$ CREATE FUNCTION `pinyin`(P_NAME VARCHAR(255)) RETURNS varchar(255) CHARSET utf8 DETERMINISTIC BEGIN DECLARE V_COMPARE VARCHAR(255); DECLARE V_RETURN VARCHAR(255); DECLARE I INT; SET I = 1; SET V_RETURN = ''; #Cir ...

Posted by lou28 on Sat, 09 Apr 2022 05:37:10 +0300

Query table: MySQL

Chapter 06_ multi-table query Multi table query, also known as association query, refers to two or more tables completing the query operation together. Prerequisite: these tables queried together are related (one to one, one to many). There must be an associated field between them. This associated field may or may not have a foreign key. Fo ...

Posted by dansk on Fri, 08 Apr 2022 17:49:16 +0300

Changes in GreatSQL 5.7.36 (2022-4-7)

[toc]1. New features1.2 add MGR role columnIn MySQL 5.7, query performance_schema.replication_group_members, no member_ The role column is not easy to quickly check which node is the Primary Node.In GreatSQL, this column is added to make it easier to view node roles and more friendly to some middleware support.mysql> select * from performanc ...

Posted by willfitch on Thu, 07 Apr 2022 12:06:10 +0300

Introduction to MySQL common index types

The original content of GreatSQL community cannot be used without authorization. Please contact Xiaobian and indicate the source for reprint.The main index types of MySQL are as follows:1. Primary key index2. Unique index3. General index4. Spatial index5. Full text indexSuppose there is a table belowCREATE TABLE `t1` ( `id` bigint unsigned NO ...

Posted by darksystem on Wed, 06 Apr 2022 05:44:02 +0300

JDBC operation notes

Step record: Load driverLink the database to get the database object DriverManagerGets the Statement object that executes SQLGet the returned result setRelease connection key word: Connection database link object Statement the object that executes the SQL statement ResultSet returned result set object Load driver DriverManager // ...

Posted by lordshoa on Wed, 06 Apr 2022 02:21:53 +0300

Niuke.com SQL question brushing III - user growth scenario (a certain degree of information flow)

SQL7 average time of browsing articles per day in November 2021 data DROP TABLE IF EXISTS tb_user_log; CREATE TABLE tb_user_log ( id INT PRIMARY KEY AUTO_INCREMENT COMMENT 'Self increasing ID', uid INT NOT NULL COMMENT 'user ID', artical_id INT NOT NULL COMMENT 'video ID', in_time datetime COMMENT 'Entry time', out_time dat ...

Posted by Who on Tue, 05 Apr 2022 17:48:46 +0300

Mysql recursive query

Mysql recursive query For tree structure data in the database, such as department table, sometimes we need to know all subordinate parts of a department or all superior departments of a part. At this time, we need to use recursive query of data! If oracle implements recursive query, we can use the START WITH... CONNECT BY function syntax ...

Posted by jdbfitz on Sun, 03 Apr 2022 13:58:39 +0300

Eight year senior technician of Alibaba: detailed learning tutorial of MySQL (Jianyi Collection)

1. First knowledge database 1.1. What is a database DataBase: DB (DataBase) Concept: data warehouse, software, installed on the operating system Function: store data and manage data 1.2. Database classification Relational database: SQL (Structured Query Language) MySQL,Oracle,Sql Server,DB2,SQLliteData is stored through the relation ...

Posted by jeva39 on Sun, 03 Apr 2022 04:21:05 +0300

MySQL learning diary day1

1, Some basic services of mysql 1. In the windows operating system, how to use commands to start and shut down mysql services? Syntax: net stop service name; net start service name; The above commands can be used to start and stop other services. 2. mysql is installed and the service is started. How can I use the client to log in to the ...

Posted by DataSpy on Sat, 02 Apr 2022 03:57:22 +0300

A murder case caused by deleting elements in the list in the loop

cause Recently, I received a request (false) to remove the objects younger than 18 years old from the member object in a list. Otherwise, there will be problems after the display. After you get the demand, you can write it quickly. The logic is also very clear, and the approximate code is as follows: void removeMember(List<Member> list ...

Posted by libertyct on Fri, 01 Apr 2022 09:38:42 +0300