1. Try not to use select * to query SQL, but select specific fields.
select * from employee;
Only take the required fields, save resources and reduce network overhead.
When select * is used for query, it is likely that the overwrite index will not be used, r ...
Posted on Thu, 30 Apr 2020 19:55:20 -0700 by adi
It's inevitable to deal with the database in java development, so here's an article about connecting mysql with jdbc, The main contents include:
1. java connect mysql
2. java queries mysql data.
3. java inserts mysql data.
4. java updates mysql data.
5. java deletes mysql data.
6. java executes mysql stored procedures.
ide: IntelliJ IDEA201 ...
Posted on Thu, 30 Apr 2020 19:11:38 -0700 by Gugel
1, Let's start with self executing functions
1. What is the immediate execution function? That is, anonymous functions
The immediate execution function is
Declare an anonymous function
Call this anonymous function now
2. An example of pop
Click to open a new window. After saving, the page will return without refreshing the data. (click the + ...
Posted on Thu, 30 Apr 2020 15:47:05 -0700 by cybersurfur
In order to prevent the user from using sql statements to inject and attack the database, the sub interface of the Statement interface can be used
java.sql.PreparedStatement extends Statement
This interface represents the object of the precompiled SQL statement, which is precompiled and stored in the PreparedStatement object. You can then use ...
Posted on Thu, 30 Apr 2020 05:14:46 -0700 by Spekta
I. software environment
Oracle Linux 7.1
II. Host settings
Master IP: 10.24.33.186
Slave IP: 10.24.33.188
Three master slave configuration
1. Master configuration
Create a replication user and grant the appropriate permissions:
mysql> create user 'repl'@'10.24.33.188' identified by 'repl';
Query OK, 0 rows affected ( ...
Posted on Wed, 29 Apr 2020 22:57:25 -0700 by joe_C_nice
14. Enterprise Actual Warfare Cases
(1) Use the for loop to create 10 html files in batch in the / oldboy directory, where the file name contains 10 random lowercase letters to reinforce the fixed string 0ldoby.
Idea analysis to generate random numbers:
The core is to create 10 random lower case letters.
echo $RANDOM range is 0-32767
Posted on Wed, 29 Apr 2020 09:37:56 -0700 by kparker
Easycode is a plug-in of idea, which can generate entity,controller,service,dao,mapper directly to the data table. It is simple and powerful without any coding.
1. Installation (EasyCode)
My words here are already loaded.
I suggest you install a plug-in called Lombok.
Lombok It can automatically generate constructor, getter/setter, equals, h ...
Posted on Tue, 28 Apr 2020 21:35:50 -0700 by jwwceo
Note: during the writing time of the article from April 201904 to may 201905, subsequent official updates in github were not written
~~Mirroringbe careful:1) Its rules can be changed at any time;2) It does not support prepare statements;
1, Extensions to MySQL query rules
Modify MySQL query rules table and add 2 columns:1) mirror_ ...
Posted on Tue, 28 Apr 2020 04:27:53 -0700 by Hebbs
Query Log for 08_ProxySQL Configuration
Note: Subsequent official updates to github were not written between 201904 and 201905~~
1. Query Logging
ProxySQL can record the query statements that pass through it (all statements, collectively referred to here as queries).Logs are configured with query rules, which allow logging to become broader or ...
Posted on Mon, 27 Apr 2020 10:34:31 -0700 by PhilVaz
Gorm create record and field defaults
Using pointer to save zero value into database
Using Scanner/Valuer interface to store zero value into database
Gorm create record and field defaults
CRUD usually refers to the operation of adding, deleting, modifying and querying the database
import ( ...
Posted on Mon, 27 Apr 2020 08:46:32 -0700 by Vasko