-
Notifications
You must be signed in to change notification settings - Fork 225
/
MySQL.sql
1466 lines (1460 loc) · 35.5 KB
/
MySQL.sql
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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--! keywords ===========================================================
-- 8.0.34 https://dev.mysql.com/doc/refman/8.0/en/keywords.html
-- 5.7.42 https://dev.mysql.com/doc/refman/5.7/en/keywords.html
-- 5.6.51 https://dev.mysql.com/doc/refman/5.6/en/keywords.html
-- 5.5.8 https://dev.mysql.com/doc/refman/5.5/en/keywords.html
-- 2022-09-15 10.9.2 https://mariadb.com/kb/en/library/reserved-words/
-- A
ACCESSIBLE (R)
ACCOUNT -- added in 5.7.6 (nonreserved)
ACTION
ACTIVE -- added in 8.0.14 (nonreserved)
ADD (R)
ADMIN -- became nonreserved in 8.0.12
AFTER
AGAINST
AGGREGATE
ALGORITHM
ALL (R)
ALTER (R)
ALWAYS -- added in 5.7.6 (nonreserved)
ANALYSE -- added in 5.6.6 (nonreserved); removed in 8.0.1
ANALYZE (R)
AND (R)
ANY
ARRAY (R) -- added in 8.0.17 (reserved); became nonreserved in 8.0.19
AS (R)
ASC (R)
ASCII
ASENSITIVE (R)
AT
ATTRIBUTE -- added in 8.0.21 (nonreserved)
AUTHENTICATION -- added in 8.0.27 (nonreserved)
AUTHORS -- removed in 5.6.8
AUTOEXTEND_SIZE
AUTO_INCREMENT
AVG
AVG_ROW_LENGTH
-- B
BACKUP
BEFORE (R)
BEGIN
END
BETWEEN (R)
BIGINT (R)
BINARY (R)
BINLOG
BIT
BLOB (R)
BLOCK
BOOL
BOOLEAN
BOTH (R)
BTREE
BUCKETS -- added in 8.0.2 (nonreserved)
BULK -- added in 8.0.32 (nonreserved)
BY (R)
BYTE
-- C
CACHE
CALL (R)
CASCADE (R)
CASCADED
CASE (R)
END CASE;
CATALOG_NAME
CHAIN
CHALLENGE_RESPONSE -- added in 8.0.27 (nonreserved)
CHANGE (R)
CHANGED
CHANNEL -- added in 5.7.6 (nonreserved)
CHAR (R)
CHARACTER (R)
CHARSET
CHECK (R)
CHECKSUM
CIPHER
CLASS_ORIGIN
CLIENT
CLONE -- added in 8.0.3 (nonreserved)
CLOSE
COALESCE
CODE
COLLATE (R)
COLLATION
COLUMN (R)
COLUMNS
COLUMN_FORMAT -- added in 5.6.6 (nonreserved)
COLUMN_NAME
COMMENT
COMMIT
COMMITTED
COMPACT
COMPLETION
COMPONENT
COMPRESSED
COMPRESSION -- added in 5.7.8 (nonreserved)
CONCURRENT
CONDITION (R)
CONNECTION
CONSISTENT
CONSTRAINT (R)
CONSTRAINT_CATALOG
CONSTRAINT_NAME
CONSTRAINT_SCHEMA
CONTAINS
CONTEXT
CONTINUE (R)
CONTRIBUTORS -- removed in 5.6.8
CONVERT (R)
CPU
CREATE (R)
CROSS (R)
CUBE (R) -- became reserved in 8.0.1
CUME_DIST (R) -- added in 8.0.2 (reserved)
CURRENT -- added in 5.6.4 (nonreserved)
CURRENT_DATE (R)
CURRENT_ROLE -- added in MariaDB 10.0.5
CURRENT_TIME (R)
CURRENT_TIMESTAMP (R)
CURRENT_USER (R)
CURSOR (R)
CURSOR_NAME
-- D
DATA
DATABASE (R)
DATABASES (R)
DATAFILE
DATE
DATETIME
DAY
DAY_HOUR (R)
DAY_MICROSECOND (R)
DAY_MINUTE (R)
DAY_SECOND (R)
DEALLOCATE
DEC (R)
DECIMAL (R)
DECLARE (R)
DEFAULT (R)
DEFAULT_AUTH -- added in 5.6.4 (nonreserved)
DEFINER
DEFINITION -- added in 8.0.4 (nonreserved)
DELAYED (R)
DELAY_KEY_WRITE
DELETE (R)
DELETE_DOMAIN_ID -- added in MariaDB
DENSE_RANK (R) -- added in 8.0.2 (reserved)
DESC (R)
DESCRIBE (R)
DESCRIPTION -- added in 8.0.4 (nonreserved)
DES_KEY_FILE -- removed in 8.0.3
DETERMINISTIC (R)
DIAGNOSTICS -- added in 5.6.4 (nonreserved)
DIRECTORY
DISABLE
DISCARD
DISK
DISTINCT (R)
DISTINCTROW (R)
DIV (R)
DO
DO_DOMAIN_IDS -- added in MariaDB 10.1.2
DOUBLE (R)
DROP (R)
DUAL (R)
DUMPFILE
DUPLICATE
DYNAMIC
-- E
EACH (R)
ELSE (R)
ELSEIF (R)
EMPTY (R) -- added in 8.0.4 (reserved)
ENABLE
ENCLOSED (R)
ENCRYPTION -- added in 5.7.11 (nonreserved)
END
ENDS
ENFORCED -- added in 8.0.16 (nonreserved)
ENGINE
ENGINES
ENGINE_ATTRIBUTE -- added in 8.0.21 (nonreserved)
ENUM
ERROR -- added in 5.5.3 (nonreserved)
ERRORS
ESCAPE
ESCAPED (R)
EVENT
EVENTS
EVERY
EXCEPT (M) -- added in MariaDB 10.3.0
EXCHANGE
EXCLUDE -- added in 8.0.2 (nonreserved)
EXECUTE
EXISTS (R)
EXIT (R)
EXPANSION
EXPIRE -- added in 5.6.6 (nonreserved)
EXPLAIN (R)
EXPORT -- added in 5.6.6 (nonreserved)
EXTENDED
EXTENT_SIZE
-- F
FACTOR -- added in 8.0.27 (nonreserved)
FAILED_LOGIN_ATTEMPTS -- added in 8.0.19 (nonreserved)
FALSE (R)
FAST
FAULTS
FETCH (R)
FIELDS
FILE
FILE_BLOCK_SIZE -- added in 5.7.6 (nonreserved)
FILTER -- added in 5.7.3 (nonreserved)
FINISH -- added in 8.0.27 (nonreserved)
FIRST
FIRST_VALUE (R) -- added in 8.0.2 (reserved)
FIXED
FLOAT (R)
FLOAT4 (R)
FLOAT8 (R)
FLUSH
FOLLOWING -- added in 8.0.2 (nonreserved)
FOLLOWS -- added in 5.7.2 (nonreserved)
FOR (R)
FORCE (R)
FOREIGN (R)
FORMAT -- added in 5.6.5 (nonreserved)
FOUND
FRAC_SECOND -- removed in 5.5.3
FROM (R)
FULL
FULLTEXT (R)
FUNCTION (R) -- became reserved in 8.0.1
-- G
GENERAL -- added in 5.5.3 (reserved); became nonreserved in 5.5.8
GENERATE -- added in 8.0.32 (nonreserved)
GENERATED (R) -- added in 5.7.6 (reserved)
GEOMCOLLECTION -- added in 8.0.11 (nonreserved)
GEOMETRY
GEOMETRYCOLLECTION
GET (R) -- added in 5.6.4 (reserved)
GET_FORMAT
GET_MASTER_PUBLIC_KEY -- added in 8.0.4 (reserved); became nonreserved in 8.0.11
GET_SOURCE_PUBLIC_KEY -- added in 8.0.23 (nonreserved)
GLOBAL
GRANT (R)
GRANTS
GROUP (R)
GROUPING (R) -- added in 8.0.1 (reserved)
GROUPS (R) -- added in 8.0.2 (reserved)
GROUP_REPLICATION -- added in 5.7.6 (nonreserved)
GTID_ONLY -- added in 8.0.27 (nonreserved)
-- H
HANDLER
HASH
HAVING (R)
HELP
HIGH_PRIORITY (R)
HISTOGRAM -- added in 8.0.2 (nonreserved)
HISTORY -- added in 8.0.3 (nonreserved)
HOST
HOSTS
HOUR
HOUR_MICROSECOND (R)
HOUR_MINUTE (R)
HOUR_SECOND (R)
-- I
IDENTIFIED
IF (R)
IGNORE (R)
IGNORE_DOMAIN_IDS -- added in MariaDB 10.1.2
IGNORE_SERVER_IDS -- became nonreserved in 5.5.8
IMPORT
IN (R)
INACTIVE -- added in 8.0.14 (nonreserved)
INDEX (R)
INDEXES
INFILE (R)
INITIAL -- added in 8.0.27 (nonreserved)
INITIAL_SIZE
INITIATE -- added in 8.0.27 (nonreserved)
INNER (R)
INNOBASE -- removed in 5.5.3
INNODB -- removed in 5.5.3
INOUT (R)
INSENSITIVE (R)
INSERT (R)
INSERT_METHOD
INSTALL
INSTANCE -- added in 5.7.11 (nonreserved)
INT (R)
INT1 (R)
INT2 (R)
INT3 (R)
INT4 (R)
INT8 (R)
INTEGER (R)
INTERSECT (R) -- added in 8.0.31 (reserved); added in MariaDB 10.3.0
INTERVAL (R)
INTO (R)
INVOKER
IO
IO_AFTER_GTIDS (R) -- added in 5.6.5 (reserved)
IO_BEFORE_GTIDS (R) -- added in 5.6.5 (reserved)
IO_THREAD
IPC
IS (R)
ISOLATION
ISSUER
ITERATE (R)
-- J
JOIN (R)
JSON -- added in 5.7.8 (nonreserved)
JSON_TABLE (R) -- added in 8.0.4 (reserved)
JSON_VALUE -- added in 8.0.21 (nonreserved)
-- K
KEY (R)
KEYS (R)
KEYRING -- added in 8.0.24 (nonreserved)
KEY_BLOCK_SIZE
KILL (R)
-- L
LAG (R) -- added in 8.0.2 (reserved)
LANGUAGE
LAST
LAST_VALUE (R) -- added in 8.0.2 (reserved)
LATERAL (R) -- added in 8.0.14 (reserved)
LEAD (R) -- added in 8.0.2 (reserved)
LEADING (R)
LEAVE (R)
LEAVES
LEFT (R)
LESS
LEVEL
LIKE (R)
LIMIT (R)
LINEAR (R)
LINES (R)
LINESTRING
LIST
LOAD (R)
LOCAL
LOCALTIME (R)
LOCALTIMESTAMP (R)
LOCK (R)
LOCKED -- added in 8.0.1 (nonreserved)
LOCKS
LOGFILE
LOGS
LONG (R)
LONGBLOB (R)
LONGTEXT (R)
LOOP (R)
END LOOP;
LOW_PRIORITY (R)
-- M
MASTER
MASTER_AUTO_POSITION -- added in 5.6.5 (nonreserved)
MASTER_BIND (R) -- added in 5.6.1 (reserved)
MASTER_COMPRESSION_ALGORITHMS -- added in 8.0.18 (nonreserved)
MASTER_CONNECT_RETRY
MASTER_DELAY
MASTER_HEARTBEAT_PERIOD -- became nonreserved in 5.5.8
MASTER_HOST
MASTER_LOG_FILE
MASTER_LOG_POS
MASTER_PASSWORD
MASTER_PORT
MASTER_PUBLIC_KEY_PATH -- added in 8.0.4 (nonreserved)
MASTER_RETRY_COUNT -- added in 5.6.1 (nonreserved)
MASTER_SERVER_ID -- removed in 8.0.23
MASTER_SSL
MASTER_SSL_CA
MASTER_SSL_CAPATH
MASTER_SSL_CERT
MASTER_SSL_CIPHER
MASTER_SSL_CRL -- added in 5.6.3 (nonreserved)
MASTER_SSL_CRLPATH -- added in 5.6.3 (nonreserved)
MASTER_SSL_KEY
MASTER_SSL_VERIFY_SERVER_CERT (R)
MASTER_TLS_CIPHERSUITES -- added in 8.0.19 (nonreserved)
MASTER_TLS_VERSION -- added in 5.7.10 (nonreserved)
MASTER_USER
MASTER_ZSTD_COMPRESSION_LEVEL -- added in 8.0.18 (nonreserved)
MATCH (R)
MAXVALUE (R)
MAX_CONNECTIONS_PER_HOUR
MAX_QUERIES_PER_HOUR
MAX_ROWS
MAX_SIZE
MAX_STATEMENT_TIME -- added in 5.7.4 (nonreserved); removed in 5.7.8
MAX_UPDATES_PER_HOUR
MAX_USER_CONNECTIONS
MEDIUM
MEDIUMBLOB (R)
MEDIUMINT (R)
MEDIUMTEXT (R)
MEMBER -- added in 8.0.17 (reserved); became nonreserved in 8.0.19
MEMORY
MERGE;
MESSAGE_TEXT
MICROSECOND
MIDDLEINT (R)
MIGRATE
MINUTE
MINUTE_MICROSECOND (R)
MINUTE_SECOND (R)
MIN_ROWS
MOD (R)
MODE
MODIFIES (R)
MODIFY
MONTH
MULTILINESTRING
MULTIPOINT
MULTIPOLYGON
MUTEX
MYSQL_ERRNO
-- N
NAME
NAMES
NATIONAL
NATURAL (R)
NCHAR
NDB
NDBCLUSTER
NESTED -- added in 8.0.4 (nonreserved)
NETWORK_NAMESPACE -- added in 8.0.16 (nonreserved)
NEVER -- added in 5.7.4 (nonreserved)
NEW
NEXT
NO
NODEGROUP
NONBLOCKING -- removed in 5.7.6
NONE
NOT (R)
NOWAIT -- added in 8.0.1 (nonreserved)
NO_WAIT
NO_WRITE_TO_BINLOG (R)
NTH_VALUE (R) -- added in 8.0.2 (reserved)
NTILE (R) -- added in 8.0.2 (reserved)
NULL (R)
NULLS -- added in 8.0.2 (nonreserved)
NUMBER -- added in 5.6.4 (nonreserved)
NUMERIC (R)
NVARCHAR
-- O
OF (R) -- added in 8.0.1 (reserved)
OFF -- added in 8.0.20 (nonreserved)
OFFSET
OLD_PASSWORD -- removed in 5.7.5
OJ -- added in 8.0.16 (nonreserved)
OLD -- added in 8.0.14 (nonreserved)
ON (R)
ONE
ONE_SHOT -- became reserved in 5.6.1; removed in 5.6.5
ONLY -- added in 5.6.5 (nonreserved)
OPEN
OPTIMIZE (R)
OPTIMIZER_COSTS (R) -- added in 5.7.5 (reserved)
OPTION (R)
OPTIONAL -- added in 8.0.13 (nonreserved)
OPTIONALLY (R)
OPTIONS
OR (R)
ORDER (R)
ORDINALITY -- added in 8.0.4 (nonreserved)
ORGANIZATION -- added in 8.0.4 (nonreserved)
OTHERS -- added in 8.0.2 (nonreserved)
OUT (R)
OUTER (R)
OUTFILE (R)
OVER (M) -- added in 8.0.2 (reserved), added in MariaDB 10.2.0
OWNER
-- P
PACK_KEYS
PAGE
PAGE_CHECKSUM
PARSER
PARSE_GCOL_EXPR -- added in 5.7.6 (reserved); became nonreserved in 5.7.8; removed in 8.0
PARTIAL
PARTITION (R) -- became reserved in 5.6.2
PARTITIONING
PARTITIONS
PASSWORD
PASSWORD_LOCK_TIME -- added in 8.0.19 (nonreserved)
PATH -- added in 8.0.4 (nonreserved)
PERCENT_RANK (R) -- added in 8.0.2 (reserved)
PERSIST -- became nonreserved in 8.0.16
PERSIST_ONLY -- added in 8.0.2 (reserved); became nonreserved in 8.0.16
PHASE
PLUGIN
PLUGINS
PLUGIN_DIR -- added in 5.6.4 (nonreserved)
POINT
POLYGON
PORT
POSITION
PRECEDES -- added in 5.7.2 (nonreserved)
PRECEDING -- added in 8.0.2 (nonreserved)
PRECISION (R)
PREPARE
PRESERVE
PREV
PRIMARY (R)
PRIVILEGES
PRIVILEGE_CHECKS_USER -- added in 8.0.18 (nonreserved)
PROCEDURE (R)
PROCESS -- added in 8.0.11 (nonreserved)
PROCESSLIST
PROFILE
PROFILES
PROXY -- added in 5.5.7 (nonreserved)
PURGE (R)
-- Q
QUARTER
QUERY
QUICK
-- R
RANDOM -- added in 8.0.18 (nonreserved)
RANGE (R)
RANK (R) -- added in 8.0.2 (reserved)
READ (R)
READS (R)
READ_ONLY
READ_WRITE (R)
REAL (R)
REBUILD
RECOVER
RECURSIVE (R) -- added in 8.0.1 (reserved), added in MariaDB 10.2.0
REDOFILE -- removed in 8.0.3
REDO_BUFFER_SIZE
REDUNDANT
REF_SYSTEM_ID -- added in MariaDB 10.1.2
REFERENCE -- added in 8.0.4 (nonreserved)
REFERENCES (R)
REGEXP (R)
REGISTRATION -- added in 8.0.27 (nonreserved)
RELAY -- added in 5.5.3 (nonreserved)
RELAYLOG
RELAY_LOG_FILE
RELAY_LOG_POS
RELAY_THREAD
RELEASE (R)
RELOAD
REMOTE -- added in 8.0.3 (nonreserved); removed in 8.0.14
REMOVE
RENAME (R)
REORGANIZE
REPAIR
REPEAT (R)
REPEATABLE
REPLACE (R)
REPLICA -- added in 8.0.22 (nonreserved)
REPLICAS -- added in 8.0.22 (nonreserved)
REPLICATE_DO_DB -- added in 5.7.3 (nonreserved)
REPLICATE_DO_TABLE -- added in 5.7.3 (nonreserved)
REPLICATE_IGNORE_DB -- added in 5.7.3 (nonreserved)
REPLICATE_IGNORE_TABLE -- added in 5.7.3 (nonreserved)
REPLICATE_REWRITE_DB -- added in 5.7.3 (nonreserved)
REPLICATE_WILD_DO_TABLE -- added in 5.7.3 (nonreserved)
REPLICATE_WILD_IGNORE_TABLE -- added in 5.7.3 (nonreserved)
REPLICATION
REQUIRE (R)
REQUIRE_ROW_FORMAT -- added in 8.0.19 (nonreserved)
RESET
RESIGNAL (R)
RESOURCE -- added in 8.0.3 (nonreserved)
RESPECT -- added in 8.0.2 (nonreserved)
RESTART -- added in 8.0.4 (nonreserved)
RESTORE
RESTRICT (R)
RESUME
RETURN (R)
RETURNED_SQLSTATE -- added in 5.6.4 (nonreserved)
RETURNING (M) -- added in 8.0.21 (nonreserved); added in MariaDB 10.0.5
RETURNS
REUSE -- added in 8.0.3 (nonreserved)
REVERSE
REVOKE (R)
RIGHT (R)
RLIKE (R)
ROLE -- became nonreserved in 8.0.1
ROLLBACK
ROLLUP
ROTATE -- added in 5.7.11 (nonreserved)
ROUTINE
ROW (R) -- became reserved in 8.0.2
ROWS (R) -- became reserved in 8.0.2; added in MariaDB 10.2.4
ROW_COUNT -- added in 5.6.4 (nonreserved)
ROW_FORMAT
ROW_NUMBER (R) -- added in 8.0.2 (reserved)
RTREE
-- S
SAVEPOINT
SCHEDULE
SCHEMA (R)
SCHEMAS (R)
SCHEMA_NAME
SECOND
SECONDARY -- added in 8.0.16 (nonreserved)
SECONDARY_ENGINE -- added in 8.0.13 (nonreserved)
SECONDARY_ENGINE_ATTRIBUTE -- added in 8.0.21 (nonreserved)
SECONDARY_LOAD -- added in 8.0.13 (nonreserved)
SECONDARY_UNLOAD -- added in 8.0.13 (nonreserved)
SECOND_MICROSECOND (R)
SECURITY
SELECT (R)
SENSITIVE (R)
SEPARATOR (R)
SERIAL
SERIALIZABLE
SERVER
SESSION
SET (R)
SHARE
SHOW (R)
SHUTDOWN
SIGNAL (R)
SIGNED
SIMPLE
SKIP -- added in 8.0.1 (nonreserved)
SLAVE
SLOW -- added in 5.5.3 (reserved); became nonreserved in 5.5.8
SMALLINT (R)
SNAPSHOT
SOCKET
SOME
SONAME
SOUNDS
SOURCE
SOURCE_AUTO_POSITION -- added in 8.0.23 (nonreserved)
SOURCE_BIND -- added in 8.0.23 (nonreserved)
SOURCE_COMPRESSION_ALGORITHMS -- added in 8.0.23 (nonreserved)
SOURCE_CONNECT_RETRY -- added in 8.0.23 (nonreserved)
SOURCE_DELAY -- added in 8.0.23 (nonreserved)
SOURCE_HEARTBEAT_PERIOD -- added in 8.0.23 (nonreserved)
SOURCE_HOST -- added in 8.0.23 (nonreserved)
SOURCE_LOG_FILE -- added in 8.0.23 (nonreserved)
SOURCE_LOG_POS -- added in 8.0.23 (nonreserved)
SOURCE_PASSWORD -- added in 8.0.23 (nonreserved)
SOURCE_PORT -- added in 8.0.23 (nonreserved)
SOURCE_PUBLIC_KEY_PATH -- added in 8.0.23 (nonreserved)
SOURCE_RETRY_COUNT -- added in 8.0.23 (nonreserved)
SOURCE_SSL -- added in 8.0.23 (nonreserved)
SOURCE_SSL_CA -- added in 8.0.23 (nonreserved)
SOURCE_SSL_CAPATH -- added in 8.0.23 (nonreserved)
SOURCE_SSL_CERT -- added in 8.0.23 (nonreserved)
SOURCE_SSL_CIPHER -- added in 8.0.23 (nonreserved)
SOURCE_SSL_CRL -- added in 8.0.23 (nonreserved)
SOURCE_SSL_CRLPATH -- added in 8.0.23 (nonreserved)
SOURCE_SSL_KEY -- added in 8.0.23 (nonreserved)
SOURCE_SSL_VERIFY_SERVER_CERT -- added in 8.0.23 (nonreserved)
SOURCE_TLS_CIPHERSUITES -- added in 8.0.23 (nonreserved)
SOURCE_TLS_VERSION -- added in 8.0.23 (nonreserved)
SOURCE_USER -- added in 8.0.23 (nonreserved)
SOURCE_ZSTD_COMPRESSION_LEVEL -- added in 8.0.23 (nonreserved)
SPATIAL (R)
SPECIFIC (R)
SQL (R)
SQLEXCEPTION (R)
SQLSTATE (R)
SQLWARNING (R)
SQL_AFTER_GTIDS -- added in 5.6.5 (reserved); became nonreserved in 5.6.6
SQL_AFTER_MTS_GAPS -- added in 5.6.6 (nonreserved)
SQL_BEFORE_GTIDS -- added in 5.6.5 (reserved); became nonreserved in 5.6.6
SQL_BIG_RESULT (R)
SQL_BUFFER_RESULT
SQL_CACHE -- removed in 8.0.3
SQL_CALC_FOUND_ROWS (R)
SQL_NO_CACHE
SQL_SMALL_RESULT (R)
SQL_THREAD
SQL_TSI_DAY
SQL_TSI_FRAC_SECOND -- removed in 5.5.3
SQL_TSI_HOUR
SQL_TSI_MINUTE
SQL_TSI_MONTH
SQL_TSI_QUARTER
SQL_TSI_SECOND
SQL_TSI_WEEK
SQL_TSI_YEAR
SRID -- added in 8.0.3 (nonreserved)
SSL (R)
STACKED
START
END
STARTING (R)
STARTS
STATS_AUTO_RECALC -- added in 5.6.6 (nonreserved), added in MariaDB 10.0.4
STATS_PERSISTENT -- added in 5.6.6 (nonreserved), added in MariaDB 10.0.4
STATS_SAMPLE_PAGES -- added in 5.6.6 (nonreserved), added in MariaDB 10.0.4
STATUS
STOP
STORAGE
STORED (R) -- added in 5.7.6 (reserved)
STRAIGHT_JOIN (R)
STREAM -- added in 8.0.20 (nonreserved)
STRING
SUBCLASS_ORIGIN
SUBJECT
SUBPARTITION
SUBPARTITIONS
SUPER
SUSPEND
SWAPS
SWITCHES
SYSTEM (R) -- added in 8.0.3 (reserved)
-- T
TABLE (R)
TABLES
TABLESPACE
TABLE_CHECKSUM
TABLE_NAME
TEMPORARY
TEMPTABLE
TERMINATED (R)
TEXT
THAN
THEN (R)
END IF;
THREAD_PRIORITY -- added in 8.0.3 (nonreserved)
TIES -- added in 8.0.2 (nonreserved)
TIME
TIMESTAMP
TIMESTAMPADD
TIMESTAMPDIFF
TINYBLOB (R)
TINYINT (R)
TINYTEXT (R)
TLS -- added in 8.0.21 (nonreserved)
TO (R)
TRAILING (R)
TRANSACTION
TRIGGER (R)
TRIGGERS
TRUE (R)
TRUNCATE
TYPE
TYPES
-- U
UNBOUNDED -- added in 8.0.2 (nonreserved)
UNCOMMITTED
UNDEFINED
UNDO (R)
UNDOFILE
UNDO_BUFFER_SIZE
UNICODE
UNINSTALL
UNION (R)
UNIQUE (R)
UNKNOWN
UNLOCK (R)
UNREGISTER -- added in 8.0.27 (nonreserved)
UNSIGNED (R)
UNTIL
UPDATE (R)
UPGRADE
URL -- added in 8.0.32 (nonreserved)
USAGE (R)
USE (R)
USER
USER_RESOURCES
USE_FRM
USING (R)
UTC_DATE (R)
UTC_TIME (R)
UTC_TIMESTAMP (R)
-- V
VALIDATION -- added in 5.7.5 (nonreserved)
VALUE
VALUES (R)
VARBINARY (R)
VARCHAR (R)
VARCHARACTER (R)
VARIABLES
VARYING (R)
VCPU -- added in 8.0.3 (nonreserved)
VIEW
VIRTUAL (R) -- added in 5.7.6 (reserved)
VISIBLE
-- W
WAIT
WARNINGS
WEEK
WEIGHT_STRING
WHEN (R)
WHERE (R)
WHILE (R)
END WHILE;
WINDOW (R) -- added in 8.0.2 (reserved), added in MariaDB 10.2.0
WITH (R)
WITHOUT -- added in 5.7.5 (nonreserved)
WORK
WRAPPER
WRITE (R)
-- X
X509
XA
XID -- added in 5.7.5 (nonreserved)
XML
XOR (R)
-- Y
YEAR
YEAR_MONTH (R)
-- Z
ZEROFILL (R)
ZONE -- added in 8.0.22 (nonreserved)
-- SQL Statements
DELIMITER
-- MariaDB 10.3 Oracle Mode
BODY
ELSIF
GOTO
HISTORY -- <= MariaDB 10.3.6 only
MINUS -- From MariaDB 10.6.1
OTHERS
PACKAGE
PERIOD -- <= MariaDB 10.3.6 only
RAISE
ROWNUM -- From MariaDB 10.6.1
ROWTYPE
SYSDATE -- From MariaDB 10.6.1
SYSTEM -- <= MariaDB 10.3.6 only
SYSTEM_TIME -- <= MariaDB 10.3.6 only
VERSIONING -- <= MariaDB 10.3.6 only
WITHOUT -- <= MariaDB 10.3.6 only
--! Data Types ===========================================================
-- Numeric Types
BIT
BOOL
BOOLEAN
BYTE
TINYINT
SMALLINT
MEDIUMINT
INT
INT1
INT2
INT3
INT4
INT8
INTEGER
LONG
BIGINT
SERIAL
SIGNED
DECIMAL
DEC
NUMERIC
FIXED
FLOAT
DOUBLE
REAL
FLOAT
FLOAT4
FLOAT8
-- Date and Time Types
DATE
DATETIME
TIMESTAMP
TIME
YEAR
MONTH
DAY
HOUR
MINUTE
SECOND
-- String Types
CHAR
NCHAR
VARCHAR
VARCHARACTER
NVARCHAR
BINARY
VARBINARY
TINYBLOB
TINYTEXT
BLOB
TEXT
MEDIUMBLOB
MEDIUMTEXT
LONGBLOB
LONGTEXT
ENUM
SET
-- Spatial Data Types
GEOMETRY
POINT
LINESTRING
POLYGON
MULTIPOINT
MULTILINESTRING
MULTIPOLYGON
GEOMETRYCOLLECTION
GEOMCOLLECTION
-- The JSON Data Type
JSON
--! Functions ===========================================================
-- Comparison Functions and Operators
COALESCE(value, ...)
GREATEST(value1, value2,...)
INTERVAL(N, N1, N2, N3, ...)
ISNULL(expr)
LEAST(value1, value2, ...)
STRCMP(expr1, expr2)
-- Flow Control Functions
IF(expr1, expr2, expr3)
IFNULL(expr1, expr2)
NULLIF(expr1, expr2)
-- String Functions
ASCII(str)
BIN(N)
BIT_LENGTH(str)
CHAR(N, ... [USING charset_name])
CHAR_LENGTH(str)
CHARACTER_LENGTH(str)
CONCAT(str1, str2, ...)
CONCAT_WS(separator, str1, str2, ...)
ELT(N, str1, str2, str3, ...)
EXPORT_SET(bits, on, off [, separator [, number_of_bits]])
FIELD(str, str1, str2, str3, ...)
FIND_IN_SET(str, strlist)
FORMAT(X, D [, locale])
FROM_BASE64(str)
HEX(str), HEX(N)
INSERT(str, pos, len, newstr)
INSTR(str, substr)
LCASE(str)
LEFT(str, len)
LENGTH(str)
LOAD_FILE(file_name)
LOCATE(substr, str), LOCATE(substr, str, pos)
LOWER(str)
LPAD(str, len, padstr)
LTRIM(str)
MAKE_SET(bits, str1, str2, ...)
MID(str, pos, len)
OCT(N)
OCTET_LENGTH(str)
ORD(str)
POSITION(substr IN str)
QUOTE(str)
REPEAT(str, count)
REPLACE(str, from_str, to_str)
REVERSE(str)
RIGHT(str, len)
RPAD(str, len, padstr)
RTRIM(str)
SOUNDEX(str)
SPACE(N)
STRCMP(expr1, expr2)
SUBSTR(str, pos), SUBSTR(str FROM pos), SUBSTR(str, pos, len), SUBSTR(str FROM pos FOR len)
SUBSTRING(str, pos), SUBSTRING(str FROM pos), SUBSTRING(str, pos, len), SUBSTRING(str FROM pos FOR len)
SUBSTRING_INDEX(str, delim, count)
TO_BASE64(str)
TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr FROM] str)
UCASE(str)
UNHEX(str)
UPPER(str)
WEIGHT_STRING(str [AS {CHAR | BINARY}(N)] [flags])
-- Regular Expressions
REGEXP_INSTR(expr, pat [, pos [, occurrence [, return_option [, match_type]]]])
REGEXP_LIKE(expr, pat [, match_type])
REGEXP_REPLACE(expr, pat, repl [, pos [, occurrence [, match_type]]])
REGEXP_SUBSTR(expr, pat [, pos [, occurrence [, match_type]]])
-- Numeric Functions and Operators
ABS(X)
ACOS(X)
ASIN(X)
ATAN(Y,X)
ATAN2(Y,X)
CEIL(X)
CEILING(X)
CONV(N, from_base, to_base)
COS(X)
COT(X)
CRC32(expr)
DEGREES(X)
DIV
EXP(X)
FLOOR(X)
FORMAT(X, D)
HEX(N_or_S)
LN(X)
LOG(X), LOG(B,X)
LOG10(X)
LOG2(X)
MOD(N, M), N % M, N MOD M
PI()
POW(X, Y)
POWER(X, Y)
RADIANS(X)
RAND([N])
ROUND(X), ROUND(X, D)
SIGN(X)