-
Notifications
You must be signed in to change notification settings - Fork 19
/
mysql.mm
376 lines (376 loc) · 27.8 KB
/
mysql.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<map version="1.0.1">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1607047356245" ID="ID_833364682" MODIFIED="1607047372730" TEXT="MySQL">
<node CREATED="1607051484795" FOLDED="true" ID="ID_284632970" MODIFIED="1607074812775" POSITION="right" TEXT="基础概念">
<node CREATED="1607051490350" ID="ID_292552628" MODIFIED="1607051493958" TEXT="数据库实例"/>
<node CREATED="1607051494188" ID="ID_964723445" MODIFIED="1607051497061" TEXT="数据库"/>
<node CREATED="1607051497281" ID="ID_831321019" MODIFIED="1607051499018" TEXT="数据表"/>
<node CREATED="1607051499237" ID="ID_272163712" MODIFIED="1607051505188" TEXT="数据行"/>
<node CREATED="1607051505415" ID="ID_1854389453" MODIFIED="1607051511069" TEXT="数据列"/>
</node>
<node CREATED="1607048060723" FOLDED="true" ID="ID_1984837" MODIFIED="1607074812079" POSITION="right" TEXT="准备">
<node CREATED="1607047664821" FOLDED="true" ID="ID_1441120847" MODIFIED="1607074437707" TEXT="MySQL">
<node CREATED="1607047945717" ID="ID_22104361" MODIFIED="1607048512655" TEXT="包&源地址">
<node CREATED="1607047948507" ID="ID_20679750" LINK="https://dev.mysql.com/downloads/mysql/" MODIFIED="1607048504098" TEXT="https://dev.mysql.com/downloads/"/>
</node>
</node>
<node CREATED="1607047667903" FOLDED="true" ID="ID_1471575751" MODIFIED="1607074436891" TEXT="Mariadb">
<node CREATED="1607048053402" ID="ID_1136594444" MODIFIED="1607048517667" TEXT="包&源地址">
<node CREATED="1607048056230" LINK="https://mariadb.org/download/" MODIFIED="1607048056230" TEXT="https://mariadb.org/download/"/>
</node>
<node CREATED="1607047886446" ID="ID_761969097" MODIFIED="1607047895417" TEXT="与MySQL版本对应关系">
<node CREATED="1607047901647" ID="ID_1007945777" LINK="https://mariadb.com/kb/en/system-variable-differences-between-mariadb-and-mysql/" MODIFIED="1607047901647" TEXT="https://mariadb.com/kb/en/system-variable-differences-between-mariadb-and-mysql/"/>
</node>
</node>
</node>
<node CREATED="1607047661866" ID="ID_627901936" MODIFIED="1609144458526" POSITION="right" TEXT="安装">
<node CREATED="1607048563653" FOLDED="true" ID="ID_1424854754" MODIFIED="1607074435802" TEXT="windows">
<node CREATED="1607048577699" ID="ID_1386388922" MODIFIED="1607048581833" TEXT="下载exe安装包"/>
</node>
<node CREATED="1607048574415" FOLDED="true" ID="ID_341005627" MODIFIED="1607074421810" TEXT="linux">
<node CREATED="1607048584777" ID="ID_807841266" MODIFIED="1607048586908" TEXT="配置源"/>
<node CREATED="1607048587158" ID="ID_578714031" MODIFIED="1607049509846" TEXT="apt/yum"/>
</node>
</node>
<node CREATED="1607048592172" FOLDED="true" ID="ID_544450518" MODIFIED="1607074815079" POSITION="right" TEXT="使用">
<node CREATED="1607049517093" FOLDED="true" ID="ID_476541187" MODIFIED="1607074420834" TEXT="mariadb">
<node CREATED="1607049527910" ID="ID_795163815" MODIFIED="1607049531226" TEXT="安装">
<node CREATED="1607049531998" ID="ID_479352037" MODIFIED="1607049541649" TEXT="yum install -y mariadb-server"/>
</node>
<node CREATED="1607049576208" ID="ID_1546841382" MODIFIED="1607049579315" TEXT="启动服务">
<node CREATED="1607049580022" MODIFIED="1607049580022" TEXT="systemctl enable mariadb"/>
<node CREATED="1607049594012" MODIFIED="1607049594012" TEXT="systemctl start mariadb"/>
</node>
<node CREATED="1607049607854" ID="ID_1536469701" MODIFIED="1607049612121" TEXT="查看服务状态">
<node CREATED="1607049623854" MODIFIED="1607049623854" TEXT="systemctl status mariadb"/>
</node>
<node CREATED="1607049648297" ID="ID_1303582941" MODIFIED="1607049650791" TEXT="配置">
<node CREATED="1607049651687" ID="ID_1749559853" MODIFIED="1607049667217" TEXT="mysql_secure_installation"/>
</node>
</node>
<node CREATED="1607048614505" FOLDED="true" ID="ID_1774042668" MODIFIED="1607074433802" TEXT="客户端">
<node CREATED="1607048616974" ID="ID_585189079" MODIFIED="1607048834082" TEXT="mysql client">
<node CREATED="1607048880409" ID="ID_1933575341" MODIFIED="1607048886289" TEXT="mysql -u root -p "/>
</node>
<node CREATED="1607048620900" ID="ID_556637726" MODIFIED="1607048830365" TEXT="navicat"/>
</node>
<node CREATED="1607051359485" ID="ID_1089308386" MODIFIED="1607073711890" TEXT="SQL">
<node CREATED="1607051361328" ID="ID_741899304" MODIFIED="1607051366770" TEXT="结构化查询语言"/>
<node CREATED="1607051256235" FOLDED="true" ID="ID_1205071262" MODIFIED="1607074419682" TEXT="分类">
<node CREATED="1607051263582" ID="ID_1556598921" MODIFIED="1607051271405" TEXT="数据定义语言">
<node CREATED="1607051340250" ID="ID_892202015" MODIFIED="1607051341498" TEXT="DDL"/>
</node>
<node CREATED="1607051271650" ID="ID_438126158" MODIFIED="1607051277456" TEXT="数据查询语言">
<node CREATED="1607051343571" ID="ID_1641576346" MODIFIED="1607051354732" TEXT="DQL"/>
</node>
<node CREATED="1607051277695" ID="ID_1119685909" MODIFIED="1607051329709" TEXT="数据操控语言">
<node CREATED="1607051346859" ID="ID_37786340" MODIFIED="1607051349761" TEXT="DML"/>
</node>
<node CREATED="1607051329953" ID="ID_1287341711" MODIFIED="1607051333315" TEXT="数据控制语言">
<node CREATED="1607051351130" ID="ID_248072264" MODIFIED="1607051352433" TEXT="DCL"/>
</node>
</node>
<node CREATED="1607067146331" FOLDED="true" ID="ID_831994019" MODIFIED="1607074417123" TEXT="DCL">
<node CREATED="1607051441901" ID="ID_1284404319" MODIFIED="1607052084830" TEXT="账号管理">
<node CREATED="1607051449508" ID="ID_1384953504" MODIFIED="1607052087147" TEXT="账号">
<node CREATED="1607052087866" ID="ID_210654681" MODIFIED="1607052108595" TEXT="User@Host"/>
<node CREATED="1607052137561" ID="ID_886958045" MODIFIED="1607052143438" TEXT="创建">
<node CREATED="1607052256322" ID="ID_646732177" MODIFIED="1607052711079" TEXT="create user if not exists 'kk'@'%' identified by 'kk@123';"/>
</node>
<node CREATED="1607052143670" ID="ID_151224306" MODIFIED="1607052145979" TEXT="删除">
<node CREATED="1607052423320" ID="ID_50408789" MODIFIED="1607053726231" TEXT="drop user if exists 'kk'@'%';"/>
</node>
<node CREATED="1607052549423" ID="ID_1709696417" MODIFIED="1607052552314" TEXT="查询">
<node CREATED="1607052553086" ID="ID_1791659610" MODIFIED="1607052565187" TEXT="select * from mysql.user\G;"/>
</node>
<node CREATED="1607053879881" ID="ID_543305548" MODIFIED="1607053881735" TEXT="修改密码">
<node CREATED="1607053884515" ID="ID_157890866" MODIFIED="1607053886630" TEXT=" set password for 'kk'@'%' = password('kk@1234');"/>
</node>
</node>
<node CREATED="1607051452809" ID="ID_1169279509" MODIFIED="1607051454165" TEXT="权限">
<node CREATED="1607053769824" ID="ID_288627832" MODIFIED="1607053784988" TEXT="赋权">
<node CREATED="1607063306058" MODIFIED="1607063306058" TEXT="grant all privileges on cmdb.* to 'kk'@'%';"/>
</node>
<node CREATED="1607054717915" ID="ID_649724267" MODIFIED="1607054719141" TEXT="查询">
<node CREATED="1607063355363" MODIFIED="1607063355363" TEXT="show grants for 'kk'@'%';"/>
</node>
<node CREATED="1607053774169" ID="ID_682948346" MODIFIED="1607053778607" TEXT="取消">
<node CREATED="1607063654099" ID="ID_702244465" MODIFIED="1607064287657" TEXT="revoke all privileges on cmdb.* from 'kk'@'%';"/>
</node>
</node>
</node>
</node>
<node CREATED="1607067149867" FOLDED="true" ID="ID_246619228" MODIFIED="1607074431642" TEXT="DDL">
<node CREATED="1607064356667" FOLDED="true" ID="ID_247426917" MODIFIED="1607074418002" TEXT="库">
<node CREATED="1607064361385" ID="ID_114534772" MODIFIED="1607064364370" TEXT="查看">
<node CREATED="1607064623962" ID="ID_494224760" MODIFIED="1607064627242" TEXT="show databases;"/>
</node>
<node CREATED="1607064364666" ID="ID_736749624" MODIFIED="1607064367259" TEXT="创建">
<node CREATED="1607064560685" ID="ID_1015280589" MODIFIED="1607064562198" TEXT="create database if not exists cmdb default charset utf8mb4 comment 'cmdb';"/>
</node>
<node CREATED="1607064642095" ID="ID_1290110876" MODIFIED="1607064643482" TEXT="详情">
<node CREATED="1607064611734" ID="ID_1403537800" MODIFIED="1607064611734" TEXT="show create database cmdb;"/>
</node>
<node CREATED="1607064367496" ID="ID_1187012914" MODIFIED="1607064372456" TEXT="删除">
<node CREATED="1607064588719" ID="ID_1993238251" MODIFIED="1607064590137" TEXT="drop database if exists cmdb;"/>
</node>
<node CREATED="1607064630782" ID="ID_1224045988" MODIFIED="1607064634932" TEXT="使用">
<node CREATED="1607064648684" ID="ID_503317428" MODIFIED="1607064651600" TEXT="use cmdb;"/>
</node>
</node>
<node CREATED="1607064657728" FOLDED="true" ID="ID_1243847054" MODIFIED="1607068521331" TEXT="表">
<node CREATED="1607064664466" ID="ID_642575153" MODIFIED="1607064666019" TEXT="查看">
<node CREATED="1607064696406" MODIFIED="1607064696406" TEXT="show tables;"/>
</node>
<node CREATED="1607064666473" ID="ID_513343023" MODIFIED="1607064668448" TEXT="创建">
<node CREATED="1607065294279" ID="ID_1517787667" MODIFIED="1607066311304" TEXT="create table if not exists user(
id bigint primary key auto_increment,
name varchar(32) not null unique key default '',
password varchar(1024) not null default '',
remark text,
created_at datetime not null,
updated_at datetime not null,
deleted_at datetime null,
index idx_remark(remark),
index idx_created_at(created_at)
) engine=innodb default charset utf8mb4;">
<node CREATED="1607065458446" ID="ID_370181945" MODIFIED="1607065462403" TEXT="数据类型">
<node CREATED="1607067225590" ID="ID_1143784713" MODIFIED="1607067227961" TEXT="数值类型">
<node CREATED="1607067256745" ID="ID_491378423" MODIFIED="1607067264425" TEXT="布尔类型">
<node CREATED="1607067268269" ID="ID_296484613" MODIFIED="1607067270303" TEXT="BOOLEAN"/>
</node>
<node CREATED="1607067232741" ID="ID_446724010" MODIFIED="1607067237141" TEXT="整数">
<node CREATED="1607067272663" ID="ID_580157820" MODIFIED="1607067450784" TEXT="TINYINT">
<node CREATED="1607067451801" ID="ID_1690710037" MODIFIED="1607067488655" TEXT="1字节"/>
</node>
<node CREATED="1607067276048" ID="ID_279223528" MODIFIED="1607067278863" TEXT="SMALLINT">
<node CREATED="1607067512390" ID="ID_678338714" MODIFIED="1607067517589" TEXT="2个字节"/>
</node>
<node CREATED="1607067284864" ID="ID_863171608" MODIFIED="1607067288981" TEXT="MEDIUMINT">
<node CREATED="1607067545682" ID="ID_1682012831" MODIFIED="1607067550603" TEXT="3字节"/>
</node>
<node CREATED="1607067279394" ID="ID_1461507974" MODIFIED="1607067562954" TEXT="INT/INTEGER">
<node CREATED="1607067556354" ID="ID_1337531390" MODIFIED="1607067558509" TEXT="4字节"/>
</node>
<node CREATED="1607067294376" ID="ID_645707798" MODIFIED="1607067298310" TEXT="BIGINT">
<node CREATED="1607067588020" ID="ID_1068397204" MODIFIED="1607067594436" TEXT="8字节"/>
</node>
</node>
<node CREATED="1607067237374" ID="ID_1919705919" MODIFIED="1607067240190" TEXT="浮点数">
<node CREATED="1607067303830" ID="ID_1409206734" MODIFIED="1607067307359" TEXT="FLOAT">
<node CREATED="1607067710215" ID="ID_1276243556" MODIFIED="1607067713377" TEXT="4字节"/>
</node>
<node CREATED="1607067307602" ID="ID_1365049453" MODIFIED="1607067310276" TEXT="DOUBLE">
<node CREATED="1607067714731" ID="ID_1247370118" MODIFIED="1607067717818" TEXT="8字节"/>
</node>
<node CREATED="1607067310651" ID="ID_1736684195" MODIFIED="1607067646516" TEXT="DECIMAL(M, D)">
<node CREATED="1607067776946" ID="ID_1912705172" MODIFIED="1607067779783" TEXT="16字节"/>
<node CREATED="1607067780027" ID="ID_1567185016" MODIFIED="1607067781064" TEXT="M">
<node CREATED="1607067794834" ID="ID_1541000317" MODIFIED="1607067836478" TEXT="所有数字最多位数"/>
</node>
<node CREATED="1607067781583" ID="ID_1138631622" MODIFIED="1607067782702" TEXT="D">
<node CREATED="1607067783486" ID="ID_300549768" MODIFIED="1607067838771" TEXT="小数最多位数"/>
</node>
</node>
</node>
</node>
<node CREATED="1607067228210" ID="ID_608438408" MODIFIED="1607067230493" TEXT="字符串类型">
<node CREATED="1607067918030" ID="ID_35788940" MODIFIED="1607067921517" TEXT="CHAR(n)"/>
<node CREATED="1607067921760" ID="ID_899566417" MODIFIED="1607067925831" TEXT="VARCHAR(n)"/>
<node CREATED="1607068082706" ID="ID_991475531" MODIFIED="1607068084972" TEXT="BLOB">
<node CREATED="1607068100077" ID="ID_945221047" MODIFIED="1607068108169" TEXT="TINYBLOB">
<node CREATED="1607068157864" ID="ID_1173150559" MODIFIED="1607068161687" TEXT="255字节"/>
</node>
<node CREATED="1607068108522" ID="ID_1330044296" MODIFIED="1607068110479" TEXT="BLOB">
<node CREATED="1607068167488" ID="ID_1729308952" MODIFIED="1607068178263" TEXT="65535字节"/>
</node>
<node CREATED="1607068110782" ID="ID_534752997" MODIFIED="1607068116867" TEXT="MEDIUMBLOB">
<node CREATED="1607068237678" ID="ID_1115523700" MODIFIED="1607068241204" TEXT="16M"/>
</node>
<node CREATED="1607068117193" ID="ID_1997375221" MODIFIED="1607068119887" TEXT="LONGBLOB">
<node CREATED="1607068246837" ID="ID_169215987" MODIFIED="1607068248694" TEXT="4G"/>
</node>
</node>
<node CREATED="1607068085216" ID="ID_1885314712" MODIFIED="1607068087703" TEXT="TEXT">
<node CREATED="1607068121755" ID="ID_336456488" MODIFIED="1607068125198" TEXT="TINYTEXT">
<node CREATED="1607068157864" ID="ID_299180382" MODIFIED="1607068161687" TEXT="255字节"/>
</node>
<node CREATED="1607068125482" ID="ID_376311336" MODIFIED="1607068127556" TEXT="TEXT">
<node CREATED="1607068167488" ID="ID_1750061672" MODIFIED="1607068178263" TEXT="65535字节"/>
</node>
<node CREATED="1607068127830" ID="ID_864595854" MODIFIED="1607068133988" TEXT="MEDIUMTEXT">
<node CREATED="1607068237678" ID="ID_103544739" MODIFIED="1607068241204" TEXT="16M"/>
</node>
<node CREATED="1607068134299" ID="ID_1257593090" MODIFIED="1607068137130" TEXT="LONGTEXT">
<node CREATED="1607068246837" ID="ID_121295695" MODIFIED="1607068248694" TEXT="4G"/>
</node>
</node>
<node CREATED="1607068306291" ID="ID_1422833131" MODIFIED="1607068308352" TEXT="JSON"/>
<node CREATED="1607068364631" ID="ID_1977913293" MODIFIED="1607068366772" TEXT="ENUM"/>
</node>
<node CREATED="1607067902086" ID="ID_1280368746" MODIFIED="1607067906156" TEXT="时间类型">
<node CREATED="1607068395341" ID="ID_188086002" MODIFIED="1607068401362" TEXT="DATE"/>
<node CREATED="1607068401655" ID="ID_1084379854" MODIFIED="1607068403345" TEXT="TIME"/>
<node CREATED="1607068426156" ID="ID_496574205" MODIFIED="1607068429343" TEXT="DATETIME"/>
<node CREATED="1607068461977" ID="ID_1126358175" MODIFIED="1607068465726" TEXT="TIMESTAMP"/>
</node>
</node>
<node CREATED="1607065462830" ID="ID_631164775" MODIFIED="1607066313819" TEXT="修饰">
<node CREATED="1607065489588" ID="ID_645520181" MODIFIED="1607065499476" TEXT="NOT NULL/NULL"/>
<node CREATED="1607065499932" ID="ID_161267791" MODIFIED="1607065507950" TEXT="DEFAULT"/>
<node CREATED="1607065509873" ID="ID_201310570" MODIFIED="1607065524873" TEXT="PRIMARY KEY/UNIQUE KEY"/>
<node CREATED="1607065525177" ID="ID_270923489" MODIFIED="1607065529745" TEXT="AUTO_INCREMENT"/>
<node CREATED="1607065531937" ID="ID_740093335" MODIFIED="1607065539091" TEXT="COMMENT ''"/>
</node>
<node CREATED="1607066314552" ID="ID_1023363382" MODIFIED="1607066318351" TEXT="索引类型">
<node CREATED="1607066319803" ID="ID_1069391320" MODIFIED="1607066321344" TEXT="hash"/>
<node CREATED="1607066321566" ID="ID_563844789" MODIFIED="1607066323505" TEXT="btree"/>
</node>
</node>
<node CREATED="1607065717051" ID="ID_1447515041" MODIFIED="1607065789931" TEXT="create table user_backup select * from user;"/>
<node CREATED="1607065790737" ID="ID_1925896213" MODIFIED="1607065815296" TEXT="create table user_202001 like user_tpl;"/>
</node>
<node CREATED="1607064668667" ID="ID_761879326" MODIFIED="1607064670537" TEXT="详情">
<node CREATED="1607065394420" ID="ID_47509855" MODIFIED="1607065394420" TEXT="show create table user;"/>
<node CREATED="1607065396652" ID="ID_1443013202" MODIFIED="1607065401684" TEXT="desc user;"/>
</node>
<node CREATED="1607064670830" ID="ID_321452227" MODIFIED="1607064673650" TEXT="删除">
<node CREATED="1607065403588" ID="ID_127435913" MODIFIED="1607065414856" TEXT="drop table if exsits user;"/>
</node>
<node CREATED="1607066372802" ID="ID_1736852809" MODIFIED="1607066379427" TEXT="重建">
<node CREATED="1607066404688" ID="ID_862377621" MODIFIED="1607066410814" TEXT="truncate table user;"/>
</node>
<node CREATED="1607066792492" ID="ID_107343279" MODIFIED="1607066793794" TEXT="修改">
<node CREATED="1607066794563" ID="ID_1920194910" MODIFIED="1607066798336" TEXT="添加列">
<node CREATED="1607066798897" MODIFIED="1607066798897" TEXT="alter table if exists user add column if not exists department varchar(64) not null default '';"/>
</node>
<node CREATED="1607066890305" ID="ID_241011948" MODIFIED="1607066891936" TEXT="修改列">
<node CREATED="1607067059183" MODIFIED="1607067059183" TEXT="alter table if exists user change column if exists department department2 varchar(32) not null default '';"/>
</node>
<node CREATED="1607066886182" ID="ID_1624423048" MODIFIED="1607066888457" TEXT="删除列">
<node CREATED="1607066889101" MODIFIED="1607066889101" TEXT="alter table if exists user drop column if exists department;"/>
</node>
</node>
</node>
<node CREATED="1607066417950" ID="ID_79502597" MODIFIED="1607066420732" TEXT="索引">
<node CREATED="1607066496534" ID="ID_1824682783" MODIFIED="1607066498226" TEXT="创建">
<node CREATED="1607066616288" MODIFIED="1607066616288" TEXT="drop index if exists idx_remark on user;"/>
</node>
<node CREATED="1607066498461" ID="ID_1091216816" MODIFIED="1607066500982" TEXT="删除">
<node CREATED="1607066606635" ID="ID_424976520" MODIFIED="1607066606635" TEXT="drop index if exists idx_remark on user;"/>
</node>
</node>
<node CREATED="1607068523125" ID="ID_898864407" MODIFIED="1607068528380" TEXT="视图"/>
</node>
<node CREATED="1607068593893" FOLDED="true" ID="ID_1213627202" MODIFIED="1607074415066" TEXT="DQL">
<node CREATED="1607070847812" ID="ID_357415271" MODIFIED="1607070851878" TEXT="基本">
<node CREATED="1607068628865" ID="ID_1620660464" MODIFIED="1607068733998" TEXT="select * from user;"/>
</node>
<node CREATED="1607070855473" ID="ID_427075171" MODIFIED="1607070858158" TEXT="指定列">
<node CREATED="1607068710466" ID="ID_946016373" MODIFIED="1607068728263" TEXT="select id, name from user;"/>
</node>
<node CREATED="1607071121272" ID="ID_1717563280" MODIFIED="1607071124881" TEXT="查询数量">
<node CREATED="1607071126411" ID="ID_1082735408" MODIFIED="1607071134925" TEXT="select count(*) from user;"/>
</node>
<node CREATED="1607070884529" ID="ID_1095567247" MODIFIED="1607070887910" TEXT="去重查询">
<node CREATED="1607068750668" ID="ID_896166522" MODIFIED="1607068782949" TEXT="select distinct department from user;"/>
</node>
<node CREATED="1607070997774" ID="ID_73233733" MODIFIED="1607071006320" TEXT="带条件查询">
<node CREATED="1607072734015" ID="ID_1769220413" MODIFIED="1607072735698" TEXT="where"/>
<node CREATED="1607072736361" ID="ID_1145243132" MODIFIED="1607072740536" TEXT="逻辑关系">
<node CREATED="1607072741256" ID="ID_182988367" MODIFIED="1607072742983" TEXT="and"/>
<node CREATED="1607072743213" ID="ID_1808119477" MODIFIED="1607072744332" TEXT="or"/>
<node CREATED="1607072744849" ID="ID_981661134" MODIFIED="1607072745816" TEXT="not"/>
</node>
<node CREATED="1607072951299" ID="ID_412385258" MODIFIED="1607072964090" TEXT="比较">
<node CREATED="1607072964082" ID="ID_489542203" MODIFIED="1607072971004" TEXT="关系">
<node CREATED="1607072956982" ID="ID_146171442" MODIFIED="1607072958391" TEXT=">"/>
<node CREATED="1607072978585" ID="ID_332140105" MODIFIED="1607072983479" TEXT=">="/>
<node CREATED="1607072972691" ID="ID_1617442156" MODIFIED="1607072974884" TEXT=" <"/>
<node CREATED="1607072984180" ID="ID_669587319" MODIFIED="1607072985242" TEXT="<="/>
<node CREATED="1607072985504" ID="ID_1545609433" MODIFIED="1607072990937" TEXT="="/>
<node CREATED="1607072986607" ID="ID_524310619" MODIFIED="1607072987624" TEXT="!="/>
</node>
<node CREATED="1607072958661" ID="ID_1485501135" MODIFIED="1607073262056" TEXT="like(like binary)">
<node CREATED="1607073027179" ID="ID_39607738" MODIFIED="1607073028371" TEXT="%"/>
<node CREATED="1607073028656" ID="ID_1097938534" MODIFIED="1607073030636" TEXT="_"/>
<node CREATED="1607073053757" ID="ID_327411675" MODIFIED="1607073055990" TEXT="ESCAPE "/>
</node>
<node CREATED="1607073268821" ID="ID_882549919" MODIFIED="1607073350895" TEXT="(not) between and"/>
<node CREATED="1607073273263" ID="ID_484920237" MODIFIED="1607073355430" TEXT="(not) in"/>
<node CREATED="1607073378424" ID="ID_88464687" MODIFIED="1607073388777" TEXT="is (not) null"/>
</node>
</node>
<node CREATED="1607070912890" ID="ID_695838458" MODIFIED="1607070917889" TEXT="限制查询">
<node CREATED="1607070919183" ID="ID_1119183031" MODIFIED="1607070953561" TEXT="select * from user limit 2;"/>
<node CREATED="1607070951169" ID="ID_157914658" MODIFIED="1607070951169" TEXT="select * from user limit 2,3;"/>
<node CREATED="1607070954764" ID="ID_1490139130" MODIFIED="1607070961636" TEXT="select * from user limit 2 offset 3;"/>
</node>
<node CREATED="1607070984202" ID="ID_1933375543" MODIFIED="1607070989050" TEXT="排序">
<node CREATED="1607071046460" MODIFIED="1607071046460" TEXT="select * from user order by id asc;"/>
<node CREATED="1607071054970" MODIFIED="1607071054970" TEXT="select * from user order by id desc;"/>
</node>
<node CREATED="1607071074510" ID="ID_882369548" MODIFIED="1607071079551" TEXT="聚合类查询">
<node CREATED="1607071170947" ID="ID_1054072381" MODIFIED="1607071191115" TEXT="select ip, count(*) from accesslog group by ip;"/>
<node CREATED="1607072560886" ID="ID_1970439493" MODIFIED="1607072566369" TEXT="聚合类函数">
<node CREATED="1607072575124" ID="ID_1130145505" MODIFIED="1607072576155" TEXT="avg"/>
<node CREATED="1607072576744" ID="ID_302850806" MODIFIED="1607072578123" TEXT="count"/>
<node CREATED="1607072578668" ID="ID_1206473627" MODIFIED="1607072604978" TEXT="max"/>
<node CREATED="1607072605314" ID="ID_1592877132" MODIFIED="1607072606320" TEXT="min"/>
<node CREATED="1607072606580" ID="ID_405659222" MODIFIED="1607072607669" TEXT="sum"/>
</node>
</node>
<node CREATED="1607071447325" ID="ID_1742829153" MODIFIED="1607071456289" TEXT="连接">
<node CREATED="1607071457110" ID="ID_174220743" MODIFIED="1607071459741" TEXT="union">
<node CREATED="1607071718417" ID="ID_1190673760" MODIFIED="1607071731272" TEXT="select id, name, remark from user where id > 5 union select id, name,remark from user where id > 6;"/>
<node CREATED="1607071722404" ID="ID_1278397829" MODIFIED="1607071722404" TEXT="select id, name, remark from user where id > 5 union all select id, name,remark from user where id > 6;"/>
</node>
<node CREATED="1607071460195" ID="ID_1175694168" MODIFIED="1607071464757" TEXT="intersect">
<node CREATED="1607071718417" ID="ID_213096081" MODIFIED="1607071776443" TEXT="select id, name, remark from user where id > 5 intersect select id, name,remark from user where id > 6;"/>
</node>
<node CREATED="1607071816607" ID="ID_697387866" MODIFIED="1607071818791" TEXT="except">
<node CREATED="1607071889343" MODIFIED="1607071889343" TEXT="select id, name, remark from user where id > 3 except select id, name,remark from user where id > 5;"/>
</node>
<node CREATED="1607071465133" ID="ID_1163753948" MODIFIED="1607071466774" TEXT="join">
<node CREATED="1607071973660" ID="ID_86106570" MODIFIED="1607072190318" TEXT="inner join"/>
<node CREATED="1607071975259" ID="ID_1005635090" MODIFIED="1607071978182" TEXT="left join"/>
<node CREATED="1607071978423" ID="ID_344373044" MODIFIED="1607071981981" TEXT="right join"/>
<node CREATED="1607072339808" ID="ID_1697651630" MODIFIED="1607072342803" TEXT="cross join"/>
</node>
</node>
<node CREATED="1607072494400" ID="ID_383272644" MODIFIED="1607072706819" TEXT="子查询"/>
<node CREATED="1607072403327" ID="ID_1784914932" MODIFIED="1607072407541" TEXT="别名">
<node CREATED="1607072410095" ID="ID_1561472735" MODIFIED="1607072411513" TEXT="表"/>
<node CREATED="1607072411736" ID="ID_641448904" MODIFIED="1607072412808" TEXT="列"/>
</node>
</node>
<node CREATED="1607073921362" FOLDED="true" ID="ID_1700802772" MODIFIED="1607074412986" TEXT="函数">
<node CREATED="1607073927239" ID="ID_464326481" MODIFIED="1607073930532" TEXT="字符串">
<node CREATED="1607074145249" ID="ID_458168268" MODIFIED="1607074146504" TEXT="upper"/>
<node CREATED="1607074146733" ID="ID_1356373085" MODIFIED="1607074148286" TEXT="lower"/>
<node CREATED="1607074148528" ID="ID_1739906256" MODIFIED="1607074150703" TEXT="trim"/>
<node CREATED="1607074228724" ID="ID_922592738" MODIFIED="1607074232487" TEXT="to_base64"/>
<node CREATED="1607074232730" ID="ID_1005520462" MODIFIED="1607074236481" TEXT="from_base64"/>
</node>
<node CREATED="1607073925295" ID="ID_13925180" MODIFIED="1607073926746" TEXT="时间">
<node CREATED="1607074004616" ID="ID_1335351788" MODIFIED="1607074005551" TEXT="now"/>
<node CREATED="1607073934109" ID="ID_1445534752" MODIFIED="1607073938877" TEXT="date_format">
<node CREATED="1607073952764" ID="ID_976779238" MODIFIED="1607073954026" TEXT="%Y"/>
<node CREATED="1607073954864" ID="ID_1693511566" MODIFIED="1607073973452" TEXT="%m"/>
<node CREATED="1607073959126" ID="ID_311260906" MODIFIED="1607073968728" TEXT="%d"/>
<node CREATED="1607073974499" ID="ID_1119750639" MODIFIED="1607073981946" TEXT="%H"/>
<node CREATED="1607073982341" ID="ID_1308738355" MODIFIED="1607073986657" TEXT="%i"/>
<node CREATED="1607073986965" ID="ID_434528162" MODIFIED="1607073990278" TEXT="%s"/>
</node>
</node>
<node CREATED="1607074348757" ID="ID_54112966" MODIFIED="1607074353145" TEXT="加解密">
<node CREATED="1607074354029" ID="ID_299137703" MODIFIED="1607074358516" TEXT="md5"/>
<node CREATED="1607074358760" ID="ID_1990922998" MODIFIED="1607074363631" TEXT="sha1"/>
</node>
</node>
<node CREATED="1607072710729" FOLDED="true" ID="ID_1660358681" MODIFIED="1607074429338" TEXT="DML">
<node CREATED="1607072713193" ID="ID_1597705913" MODIFIED="1607072714897" TEXT="INSERT">
<node CREATED="1607073569875" ID="ID_539669778" MODIFIED="1607073592957" TEXT="returning"/>
</node>
<node CREATED="1607072715151" ID="ID_1464332086" MODIFIED="1607072719656" TEXT="UPDATE"/>
<node CREATED="1607072720194" ID="ID_202789021" MODIFIED="1607072722974" TEXT="DELETE"/>
</node>
<node CREATED="1607073715115" FOLDED="true" ID="ID_1125165948" MODIFIED="1607074430698" TEXT="事务">
<node CREATED="1607073751740" ID="ID_977564848" MODIFIED="1607073759695" TEXT="START TRANSACTION"/>
<node CREATED="1607073760005" ID="ID_278673281" MODIFIED="1607073763148" TEXT="COMMIT"/>
<node CREATED="1607073763426" ID="ID_1637624127" MODIFIED="1607073767835" TEXT="ROLLBACK"/>
</node>
</node>
</node>
</node>
</map>