Mysql nested subquery

Mysql nested subquery Subquery refers to a form of writing in which several small queries with different functions are nested in a complete query statement to complete complex queries together. In order to make readers more aware of the concept of subquery. Results returned by subquery There are four types of data that can be returned by sub ...

Added by mr02077 on Thu, 27 Jan 2022 08:34:29 +0200

[Yugong series] January 2022 Mysql database - trigger

1, MySQL trigger 1. Concept of trigger Triggers are database objects related to tables. They can trigger and execute SQL statements defined in triggers before or after insert/update/delete. This feature of trigger can help the application in the database to ensure data integrity, logging, data verification and other operations.The alias ...

Added by ppera on Thu, 27 Jan 2022 06:00:15 +0200

[Mysql basics] v TCL language (transaction control)

I Common database objects objectdescribeTABLEA logical unit that stores data in the form of rows and columnsdata dictionarySystem table, a table that stores database related information. The data of the system table is usually maintained by the database system. Programmers should not modify it, but can only view itCONSTRAINTRules for data veri ...

Added by IMP_TWI on Thu, 27 Jan 2022 04:28:43 +0200

Mysql learning notes (quick review)

MySQL is a must for programmers to master. In fact, the language is simple. As long as you practice more, you can master it. 1, MySQL Foundation 1. Database connection tool 1.1 Navicat tutorial Navicat for MySQL tutorial (implementation of addition, deletion, modification and query) 2. DDL operation database SHOW DATABASES; The ...

Added by Radon3k on Thu, 27 Jan 2022 02:32:38 +0200

MySQL-MHA high availability configuration and failover

1, MHA (meaning, composition and characteristics) Meaning (what is MHA) MHA (MasterHigh Availability) is a set of excellent software for failover and master-slave replication in MySQL high availability environment.The emergence of MHA is to solve the problem of MySQL single point.During MySQL failover, MHA can automatically complete the f ...

Added by EdN on Thu, 27 Jan 2022 01:49:02 +0200

PreparedStatement implements operations on database tables

Note: The links below are all based on mysql as an example, @Test is a Junit4 comment for testing, and the tool classes used are described in the previous section Post the table-building statement first for easy follow-up CREATE TABLE `fruit` ( `fruitName` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT 'Fruit Name', `id` int(11) NOT N ...

Added by ralph4100 on Wed, 26 Jan 2022 21:23:21 +0200

Day517. Index optimization and query optimization mysql

Index optimization and query optimization 1, Data preparation Insert 500000 entries in the student table and 10000 entries in the class table. Step 1: create a table #Class table CREATE TABLE `class` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `className` VARCHAR(30) DEFAULT NULL, `address` VARCHAR(40) DEFAULT NULL, `monitor` INT NULL , PRIMARY ...

Added by gnetcon on Wed, 26 Jan 2022 21:19:06 +0200

Wan Da #21, how to check the connection of MySQL database for a period of time

The original content of GreatSQL community cannot be used without authorization. Please contact Xiaobian and indicate the source for reprint.View modeIt is known that there are at least two ways to achieve this1. Turn on general_log can be observedOpen commandmysql> set global general_log=ON;Perform some operations[root@mgr2 ~]# mysql -uGrea ...

Added by topflight on Wed, 26 Jan 2022 19:50:57 +0200

Record a troubleshooting of the slow response of the server

I checked the problem for a week. I was a little nervous and panicked. I was ignorant before I determined the cause of the problem. 1. It is found that there is mysql connection timeout (Communications link failure, The last packet sent successfully to the server was 0 milliseconds ago. Caused by: java.net.ConnectException: Connection timed ou ...

Added by horstuff on Wed, 26 Jan 2022 18:10:45 +0200

Sorting and paging

Sorting of data If sorting operation is not used, the data returned by query is displayed in the order of adding data by default. Sorting using the ORDER BY clause ASC (ascend): ascending (default)DESC (descend): descending The ORDER BY clause is at the end of the SELECT statement. Single column sorting For example: # Display employe ...

Added by HSM on Wed, 26 Jan 2022 18:07:34 +0200