premise
1. Understand database, JDBC, maven and other basic knowledge. 2. This paper uses idea and maven to illustrate.
1, Introduction to MyBatis
1. Official profile
MyBatis is an excellent persistence layer framework, which supports custom SQL, stored procedures and advanced mapping. MyBatis eliminates almost all JDBC code and the wor ...
Posted by fox_m on Fri, 15 Apr 2022 17:37:59 +0300
108_ Installation of Linux version of Nacos
Expected, 1 Nginx+3 nacos registries +1 mysq
Make sure you are installing and using in the environment:
64 bit OS Linux/Unix/Mac, Linux system is recommended.64 bit JDK 1.8+; Download to configure.Maven 3.2.x+; Download to configure.Only three or more Nacos nodes can form a cluster.
link
Nacos d ...
DQL: query statement
Sort queryAggregate functionGrouping queryPaging query constraintRelationship between multiple tablesnormal formBackup and restore of database
DQL: query statement
Sort query
Syntax: order by clause
order by sort field 1, sort by 1, sort field 2, sort by 2 Sort by:
ASC: ascending, default.DESC: descending. ...
Posted by cheesehead on Fri, 15 Apr 2022 02:36:28 +0300
Create sample table
Creation of Table 1
create table Double list 1
(
id int PRIMARY key,
name varchar(30)
)
insert into Double list 1 select 1,'Xiao Ming';
insert into Double list 1 select 0,'Zhang San';
insert into Double list 1 select 0,'Boiling sheep';
insert into Double list 1 select 0,'Li Yang';
insert into Double list 1 select 0,'G ...
Posted by goa103 on Thu, 14 Apr 2022 00:47:29 +0300
Chapter 3 relational database standard language SQL
The whole content of this paper comes from the introduction to database system (5th Edition) - written by Wang Shan and SA Shixuan
3.1 SQL overview
Comprehensive unificationHighly unprocessedSet oriented operation modeProvide multiple ways to use the same syntax structureThe grammar is ...
Posted by khovorka on Mon, 11 Apr 2022 19:09:21 +0300
What is a partition table? Why use partition table? How to create a partition table?
If the data in a table in your database meets the following conditions, you should consider creating a partitioned table. 1. There are a lot of data in a table in the database. What are many concepts? Ten thousand? 20000? One hundred thousand or one million? T ...
Posted by Garrett on Mon, 11 Apr 2022 09:20:24 +0300
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
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