SQL - student table data
Simple query
Select several tuples in the tableSelect several columns in the tableorder by clausegroup by clauseAggregate function
Select several columns in the table
Query the student number and name of all students
select sno,sname
from student
Select several rows in the table
Eliminate rows with duplicate values DISTINCT Query the stu ...
Posted by hobeau on Mon, 06 Dec 2021 21:52:17 -0800
MyBatis framework -- multi table query and dynamic sql
catalogue
1. Multi table query
1.1 many to one
(1) The first way is to query through linked list.
(2) The second way is through nested query. ---- two queries.
one point two One to many
2. Dynamic SQL
(1) if with where
(2) [choose when otherwise] and where
(3)set tag --- modify some fields ...
Posted by Pandolfo on Sun, 05 Dec 2021 16:15:44 -0800
Day_01 [MySQL] select condition query, order by sort, group by group query, single line processing function [source code attached]
1, select basic syntax
The select statement is used to select data from the database. The results are stored in a result table called a result set. Quotation marks and semicolons in the select query statement are English symbols, and the end flag of the query statement is semicolon.
Take dept table as an example to demonstrate: Descr ...
Posted by waltonia on Sun, 05 Dec 2021 07:34:12 -0800
SQL basic application - DQL (select)
The world.sql exercise on the mysql official website is used
DQL introduction
select show
Application of select statement
select is used alone
select @@port; --View port
select @@basedir; --View the directory where the program is located
select @@server_id; --see server_id
mysql> select database(); --View the current library
+- ...
Posted by batterdmooie on Sat, 04 Dec 2021 19:07:48 -0800
05 SQL statement execution process analysis 2 - query logic optimization
sql execution statement flow analysis
The whole processing flow is in exec_simple_query function. The code structure is as follows:
/*
* exec_simple_query
*
* Execute a "simple Query" protocol message.
*/
static void
exec_simple_query(const char *query_string)
{
...
//Original syntax tree acquisition
/*
* Do basic parsing of the quer ...
Posted by scottlowe on Sat, 04 Dec 2021 17:11:50 -0800
05 SQL statement execution process analysis 3 query physical optimization
sql execution statement flow analysis
The whole processing flow is in exec_simple_query function. The code structure is as follows:
/*
* exec_simple_query
*
* Execute a "simple Query" protocol message.
*/
static void
exec_simple_query(const char *query_string)
{
...
//Original syntax tree acquisition
/*
* Do basic parsing of the quer ...
Posted by Elhombrebala on Sat, 04 Dec 2021 15:37:27 -0800
Teach MyBatis to connect to Mysql to complete addition, deletion, modification and query (CRUD)
MyBatis connects to Mysql to complete addition, deletion, modification and query
1. Step 1: create a SpringBoot project
Select related dependencies Note: if you forget to import the related dependencies: you can import them manually. Search the name of the related jar in the link below maven warehouse
Step 2: create database tables accordin ...
Posted by Yari on Fri, 03 Dec 2021 16:58:24 -0800
SQL learning experience summary (phase IV) 6 issues in total
catalogue
7, View and index
1. Improve query efficiency
2. View
2.1 definition and function of view
2.2 reasons and advantages of establishing view
2.3 use of views
3. Index
3.1 concept of index
3.2 functions and advantages of index
3.3 index and storage engine
3.4 classification of index
3.4.1 general index
3.4.2 unique index
3.4 ...
Posted by webing on Fri, 03 Dec 2021 08:31:18 -0800
5. There are 37 mysql exercises. Once you finish these mysql exercises, you will be advanced immediately. (with answers)
1, The table structure in the existing database casemanage is shown in the following figure
TABLENAME:afinfo
Idnameagebirthsexmemo1Xu Hongguo371979-03-23malehigh school2Wang Fangfang261988-02-06femaleundergraduate3Xu Xiaosheng241990-04-02malemaster4Chen Xiao301984-09-12femaledoctor5Zheng Kai271987-12-30malejunior college
1) Please write s ...
Posted by disconne on Fri, 03 Dec 2021 03:42:56 -0800
A summary of the use of clickhouse
It is said that clickhouse is a columnar storage database used in olap scenarios with a large amount of data. Fortunately, it can also be used in actual scenarios. Let's talk about the simple experience of using this article.
1. Overall description
Not much about architecture, column storage, large amount of data and high performance. See off ...
Posted by arlabbafi on Fri, 03 Dec 2021 00:26:30 -0800