MySQL Advanced Statement - Common Queries
Preface
(add, delete, change, check) Queries to MySQL databases sometimes require processing of the result set of the query in addition to the basic query. Examples include taking only 10 pieces of data, sorting or grouping query results, and so on
1. Sort by keyword
PS: Analogue to windows Task Manager You can use the SELECT stateme ...
Added by Drumminxx on Wed, 27 Oct 2021 20:37:51 +0300
Troubleshooting of MySQL query timeout
A sentry alarm was received this week. The following SQL query timed out.
select * from order_info where uid = 5837661 order by id asc limit 1
Execute show create table order_info It is found that this table is actually indexed
CREATE TABLE `order_info` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) unsigned,
...
Added by synchro_irl on Wed, 27 Oct 2021 14:41:44 +0300
SQL injection attack
sql injection attack
1. Principle Because the SQL statement parameters are sent from the foreground to the background, and the background SQL statements are spliced, if the database keywords appear in the splicing process, the semantics of the spliced SQL statements may be changed, so as to perform some other operations. This phenomenon is cal ...
Added by baldwinw on Sun, 24 Oct 2021 13:11:03 +0300
JDBC connection to database: notes of Shang school
JDBC introduction
JDBC(Java Database Connectivity) is a common interface (a set of API s) independent of a specific database management system and common SQL database access and operation. It defines the standard Java class libraries used to access the database (java.sql, javax.sql). Using these class libraries, you can easily access database ...
Added by djopie on Mon, 18 Oct 2021 21:37:46 +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
SQL learning notes
1. Insert data INSERT INTO
1.1 insert complete line
INSERT INTO customers
VALUES(100,
'Tony',
'USA',
NULL,
NULL);
This example inserts a new customer into the customers table. Each column of data stored in the table is given by VALUES, and each column must be provided with a value. If a column has no value, NULL is u ...
Added by PartyMarty on Sun, 17 Oct 2021 20:46:29 +0300
Data warehouse tool hive
1. What's Hive
1. General Apache Hive data warehouse software provides query and management of large data sets stored in distributed. It is built on Apache Hadoop and mainly provides the following functions:
(1) It provides a series of tools that can be used to extract / transform / load data (ETL);
(2) It is a mechanism that can store, quer ...
Added by SleepyP on Sat, 16 Oct 2021 08:51:21 +0300
CTFHUB real exercises over the years
Test site
Boolean blind injection, SSRF
Tried the general login method and did not respond. Check the source code and find that the utilization point of sql injection is in the picture Blind injection script
import string
from requests import *
allstr = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()* ...
Added by phpfanphp on Tue, 12 Oct 2021 09:13:42 +0300
MySQL puzzle solving - GROUP BY implicit sorting
What is the concept of GROUP BY implicit sorting in MySQL? The main reason is that other RDBMS do not have such a concept. If you have not carefully understood the concept, you will feel a little confused about it. Let's take a look at the introduction of the official document first:
The chapter ". 2.1.14 ORDER BY Optimization" in th ...
Added by inrealtime on Sun, 10 Oct 2021 07:53:01 +0300
SQL injection details 23-28
Less-23 (filter annotation symbols -- union joint injection)
Summary of level 23: Through manual test, it is found that # and – + are filtered in this level. We can only find ways to close single quotation marks, and there are many closing methods. There are also many closing methods in the following injection process. The rest ca ...
Added by matrixd on Fri, 08 Oct 2021 12:54:50 +0300