1. Determine if there is injection, plus, and 1=1;and 1=2
2. Determine version and Ord (Mid (Version (), plus)) >51/* Return normal description is 4.0 or higher, you can use union query
3. Use ORDER by storm field, add order by 10/* After URL if
1. sort by strokes of the Last Name:Select * From TableName Order By CustomerName Collate Chinese_PRC_Stroke_ci_as // From less to more
2. database encryption:Select encrypt ('original password ')Select pwdencrypt ('original password ')Select
///
/// Use Order By and Where filtering in DataTable
///
Private void Bind ()
{
// Construct a data source
DataTable dt = new DataTable ();
Dt. Columns. Add ("ID", typeof (System. String ));
Dt. Columns. Add ("uName", typeof (System. String
1
Mybatis-there is no getter for property named 'tj 'in 'class java. Lang. string'
Select .. $ {TJ}
An error was reported during the test: There is no getter for property named 'tj 'in 'class java. Lang. string'
Problem Analysis: mybatis uses
Mysql build and basic commands, mysql build commands
I. mysql setup process
Install mysql on ubuntu
1. sudo apt-get install mysql-server
2. sudo apt-get install mysql-client
3. sudo apt-get install libmysqlclient-dev
2. Basic commands-Logon,
MYSQL design optimization and mysql Design
This article describes how to optimize mysql from various aspects.1. Optimize SQL statements (1) locate the SQL statements to be optimized (1) count the frequency of SQL statements using show
The lag and lead functions are used to retrieve the data of the first n rows and the data of the last n rows. They must be combined with the over (order by) function.Select id, name from daveId name4 SF3 Oracle4 eygle5 rman4 export The dave table
Game test-database Statement 1, test database Statement 1Select id, name, energy from db_name where engrgy between '000000' and '000000'To sort the output content once, use order by asc to change from small to large to desc.Select id, name, energy
SQL statement + select top usage of "Fetch 10th to 20th records from a data table", 10th SQL statements
1. First, select top usage:
For more information, see the differences between select top n * from and select * from.
Select * from table --
Mysql RAND () casually query record efficiency issues and solutions to share, mysqlrand
Efficiency has always been a problem during our development, especially for a lot of large data operations. Today we have a random query of data, at the
CopyCode The Code is as follows: select...
Union [All | distinct]
Select...
[Union [All | distinct]
Select...]
Select... Union [All | distinct] Select... [Union [All | distinct] Select...]
Union is used to combine the results from many select
When writing a statement today, execute it in the query analyzer.
It takes less than 10 s to use another method, which is less than 1 s. The colleague said that it is because of the SQL sentence execution sequence. I have seen a few moments before
I
Importance of Indexes
Indexes in database performance optimization are definitely a heavyweight factor. It can be said that improper indexing and other optimization measures will be meaningless.
Clustered Index(Clustered index)Non-clustered
The complete execution sequence of the SQL SELECT statement:
1. The from clause assembles data from different data sources;2. The WHERE clause filters record rows based on specified conditions;3. The group by clause divides data into multiple
-- General steps to optimize SQL -- 1. Learn the execution frequency of various SQL statements through show status and application features/* provide server status information through show status, you can also use the mysqladmin extended-STATUS
There are two types of indexes in InnoDB: B + tree indexes and hash indexes. The hash index is self-adaptive. The storage engine automatically creates a hash index based on the table usage and cannot interfere with the hash index.
1. Clustered Index
Most of us do not need to deal with databases when we develop software. Especially for ERP development, we have to deal with databases more frequently, and thousands of rows of data are still stored. If there is a large amount of data, there will be
Mysql performance optimization 2: mysql Performance Optimization
Next, Mysql performance optimization 1Create an appropriate index
To improve database performance, indexing is the best and inexpensive. There is no need to add memory, no need to
In MySQL, the default Character Set utf8 is used. The sorting order of Chinese characters by Pinyin is messy, not the result we want.
The solution is as follows:
1. If you do not want to change the table definition and default encoding, convert
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.