[java learning path] (mysql) 003 Creation, deletion and constraint of limit and table in mysql
limit
limit action
Extract part of the query result set. It is usually used in paging queries
How does limit work?
Full usage: limit startIndex, length
startIndex Is the starting subscript, length Is the length.
The starting subscript starts at 0.
Default usage: limit 5; This is the top five.
Take out the top 5 employees in descend ...
Posted by Boo-urns on Mon, 07 Feb 2022 19:03:38 +0100
The basic syntax of MySQL is the syntax of creating tables and adding, deleting and modifying data in tables
Operation syntax of MySQL basic syntax on tables
This paper summarizes the syntax of adding, deleting and modifying data in tables in MySQL and the syntax of creating tables
Add data to the table (insert)
Adding data to a table can be done individually or in batches
Basic grammar
Add single
insert into Table name(field,field,fie ...
Posted by washbucket on Mon, 07 Feb 2022 12:28:59 +0100
Spring Boot Chapter 2 integrating Druid database connection pool
Integrated Druid
Introduction to Druid
A large part of Java programs need to operate the database. In order to improve the performance, they have to use the database connection pool when operating the database.
Druid is a database connection pool implementation on Alibaba's open source platform. It combines the advantages of C3P0, DBCP and o ...
Posted by whitepony6767 on Mon, 07 Feb 2022 02:41:46 +0100
mysql database: retrieving information from tables
catalogue
(1) Select all data
(2) Modify table contents
Method 1
Method 2
(3) Select a row individually
(4) Select special columns
(5) Classification line
(6) Date calculation
(7) NULL value operation
(8) Pattern matching
(1) Select all data
select * from pet;
Return:
(2) Modify table contents
Method 1
Delete first
DELETE FR ...
Posted by Xeon on Sat, 05 Feb 2022 20:01:03 +0100
Database - SQL language
1. Basic concepts of SQL
1.1 SQL concept and classification
Definition: SQL is the abbreviation of Structured Query Language, which means Structured Query Language. It is a language for querying or changing the data in the database in the database management system
Mainstream database management system
Relational database
MySQL
Oracle
Po ...
Posted by sintax63 on Sat, 05 Feb 2022 11:03:18 +0100
[MyBatis Plus 3.5.1] 2. CRUD extension: automatic filling, optimistic locking, paging query, logical deletion [Spring Boot environment]
1,Insert
1) Insert test
@Test
void testInsert(){
User user = new User();
user.setName("tuwer");
user.setAge(8);
user.setEmail("abc@qq.com");
// id will be generated automatically
int res = userMapper.insert(user);
System.out.println(res);
System.out.println(user);
}
2) Primary key policy
@TableId
...
Posted by poirot on Fri, 04 Feb 2022 12:45:53 +0100
4 integrity constraint naming clause 5.6 assertion
5.4 integrity constraint naming clause
Integrity constraint naming clause Constraint < integrity constraint name > < integrity constraint > ◾ < integrity constraints > include not null, unique, primary key phrase, foreign key phrase, check phrase, etc [example 5.1] establish a Student registration fo ...
Posted by iceraider on Fri, 04 Feb 2022 10:52:20 +0100
Redis persistence - AOF
catalogue
1 what is AOP
2 appendonly.aof file
3 Rewrite
3.1 what is rewrite
3.2 rewriting principle
3.3 trigger mechanism
4 advantages and disadvantages of AOF
5 Summary
5.1 comparison between RDB and aof
5.2 enable two persistence methods at the same time
1 what is AOP
Record every write operation in the form of log, and rec ...
Posted by badassrocker on Thu, 03 Feb 2022 20:42:18 +0100
Redis Notes - Transactions and Integration springboot
affair
Redis's single command guarantees atomicity, but the redis transaction does not guarantee atomicity
Redis Transaction nature: A collection of commands.
----------------- queue set set set implement -------------------
Each command in a transaction is serialized and executed sequentially. No interference from other commands is allowe ...
Posted by jej1216 on Thu, 03 Feb 2022 20:14:07 +0100
Detailed explanation of Mysql constraints
Detailed explanation of Mysql constraints
The blog talks about an important knowledge point in database - constraints
1, What are constraints
constraint
Constraints are actually constraints on the data in the table
2, Restraint effect
The purpose of adding constraints in table design is to ensure that the records in the table are complete ...
Posted by fenderville on Thu, 03 Feb 2022 14:39:54 +0100