Mysql trigger field bidirectional update

Business scenario: balance shared by different business systems, hjmallind_user and ims_cjdc_user two tables have different balance fields, but share the balance value. Trigger definition: DROP TRIGGER IF EXISTS `test-up_ds_wallet`; CREATE  TRIGGER `test-up_ds_wallet` AFTER UPDATE ON `ims_cjdc_user`      FOR EACH ROW      BEGIN         DECLAR ...

Added by jokkis on Sat, 23 Oct 2021 09:04:00 +0300

Advanced MySQL database

1. Services 1.1 concept of transaction Transaction: a transaction consists of one or more SQL statements in a single unit, in which each MySQL statement is interdependent. The whole single cell is an inseparable whole. If an SQL statement in the cell fails or generates an error, the whole cell will be rolled back. All affected data will be re ...

Added by s0me0ne on Sat, 23 Oct 2021 06:36:09 +0300

MySQL - table integrity constraints (foreign key constraints)

1. What are integrity constraints? In order to prevent non-conforming data from being stored in the database, MySQL provides a mechanism to check whether the data in the database meets the specified conditions when users insert, modify and delete the data, so as to ensure the accuracy and consistency of the data in the database. This mechanism ...

Added by lost305 on Fri, 22 Oct 2021 00:50:39 +0300

SpringBoot+Mybatis+AOP for Read-Write Separation

Foreword: At this stage of high concurrency, MySQL must be read-write separated. In fact, most Internet websites or App s read more and write less. So in this case, if you write a master library, but the master library hangs multiple slaves and reads from multiple slaves, can't that support higher read concurrency pressure? 1. MySQL Read-Write ...

Added by jasonX on Thu, 21 Oct 2021 23:32:18 +0300

BuBu Bu Notes - Mybatis Getting Started (Miss Baldy's extra-detailed notes, beginners must see!)

Preface Every time I open the learning video to watch, I always want to organize and record it in the future, but there are always some big and small reasons (well, only lazy) that cause this wonderful dream to be broken. Ha-ha, I don't know what kind of mood trend it is today. I opened it and wrote this sentence, but I hope I can really ...

Added by Bootsman123 on Thu, 21 Oct 2021 20:02:34 +0300

Tencent cloud installs the configuration database MySQL and uses SQLyog to connect

1, The first is the one click installation and uninstallation commands of MySQL (you can choose any one to execute) (1) Installation command sudo apt-get install mysql (Download the latest version) sudo apt install mysql-server mysql-client (2) Uninstall command: if there is a problem, reinstall MySQL for use, such as forgetting the initial ...

Added by ziong on Tue, 19 Oct 2021 04:19:29 +0300

Introduction to JDBC

catalogue 1. Introduction to JDBC 2. Common API components 3. JDBC usage 3.1 introducing MySQL driver 3.2 jdbc connection database programming Programming steps 4. Common API usage 4.1 Connection interface: the object of database connection 4.2 Statement interface: used to execute SQL statements 4.3 ResultSet(): returns the result set ...

Added by gidiag on Tue, 19 Oct 2021 04:08:48 +0300

The first Mybatis program for basic Mybatis learning

Preface: Hello, ladies and gentlemen, I'm running like a snail rz. Of course you can call me Snail Jun. I'm a beginner who has studied Java for more than half a year. At the same time, I have a great dream that I will become an excellent Java architect one day. This Mybatis Basic Learning series is used to record the whole process of my lea ...

Added by kra on Mon, 18 Oct 2021 19:23:45 +0300

SQL with as recursive query

1, CTE characteristics Starting from SQL Server 2005, syntax support for CTE(Common Table Expression) is provided. CTE is a temporarily named result set defined in SELECT, INSERT, UPDATE or DELETE statements. At the same time, CTE can also be used in the definition of views. A reference to itself can be included in the CTE, so this expression i ...

Added by tracivia on Mon, 18 Oct 2021 07:31:02 +0300

Deploy Springboot+Mysql project with Docker Compose

Deploy Springboot+Mysql project with Docker Compose In the last article Spring Boot(Maven)+Docker packaging In, we implemented one click packaging and deployment of the Springboot project source code as a Docker service. In the above, if our Springboot project wants to connect to the database, it must be connected to the public IP. This paper ...

Added by derekm on Sat, 16 Oct 2021 12:11:03 +0300