-
Notifications
You must be signed in to change notification settings - Fork 92
/
sql-92.bnf.html
6621 lines (6111 loc) · 511 KB
/
sql-92.bnf.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Generated HTML - Modify at your own peril! -->
<html>
<head>
<title> BNF Grammar for ISO/IEC 9075:1992 - Database Language SQL (SQL-92) </title>
</head>
<body>
<h1> BNF Grammar for ISO/IEC 9075:1992 - Database Language SQL (SQL-92) </h1>
<a name="top"> </a>
<br>
<a href="#xref-rules"> Cross-Reference: rules </a>
<br>
<a href="#xref-keywords"> Cross-Reference: keywords </a>
<br>
<p><font color=green><i><small>
Derived from file sql-92.bnf version 2.5 dated 2017/01/17 01:05:03
<br>
Generated on 2017-11-14 06:53:25+00:00 by file bnf2html.pl version 3.16 dated 2017/11/14 06:53:22
</small></i></font></p>
<p>
Using Appendix G of "Understanding the New SQL: A Complete Guide" by J
Melton and A R Simon (Morgan Kaufmann, 1993, ISBN 0-55860-245-3) as the
source of the syntax, here is (most of) the BNF syntax for SQL-92. The
missing parts are the Cobol, Fortran, MUMPS, Pascal and PL/I variable
definition rules.
</p>
<p>
The plain text version of this grammar is
<a href='sql-92.bnf'> sql-92.bnf </a>.
</p>
<hr>
<h2> Key SQL Statements and Fragments
</h2>
<bl>
<li> ALLOCATE CURSOR <a href='#allocate cursor statement'><allocate cursor statement></a>
<li> ALTER DOMAIN <a href='#alter domain statement'><alter domain statement></a>
<li> ALTER TABLE <a href='#alter table statement'><alter table statement></a>
<li> CLOSE cursor <a href='#close statement'><close statement></a> <a href='#dynamic close statement'><dynamic close statement></a>
<li> Column definition <a href='#column definition'><column definition></a>
<li> COMMIT WORK <a href='#commit statement'><commit statement></a>
<li> CONNECT <a href='#connect statement'><connect statement></a>
<li> CREATE ASSERTION <a href='#assertion definition'><assertion definition></a>
<li> CREATE CHARACTER SET <a href='#character set definition'><character set definition></a>
<li> CREATE COLLATION <a href='#collation definition'><collation definition></a>
<li> CREATE DOMAIN <a href='#domain definition'><domain definition></a>
<li> CREATE SCHEMA <a href='#schema definition'><schema definition></a>
<li> CREATE TABLE <a href='#table definition'><table definition></a>
<li> CREATE TRANSLATION <a href='#translation definition'><translation definition></a>
<li> CREATE VIEW <a href='#view definition'><view definition></a>
<li> Data type <a href='#data type'><data type></a>
<li> DEALLOCATE PREPARE <a href='#deallocate prepared statement'><deallocate prepared statement></a>
<li> DECLARE cursor <a href='#declare cursor'><declare cursor></a> <a href='#dynamic declare cursor'><dynamic declare cursor></a>
<li> DECLARE LOCAL TEMPORARY TABLE <a href='#temporary table declaration'><temporary table declaration></a>
<li> DELETE <a href='#delete statement: positioned'><delete statement: positioned></a> <a href='#delete statement: searched'><delete statement: searched></a> <a href='#dynamic delete statement: positioned'><dynamic delete statement: positioned></a>
<li> DESCRIBE <a href='#describe statement'><describe statement></a>
<li> DESCRIPTOR statements <a href='#system descriptor statement'><system descriptor statement></a>
<li> DISCONNECT <a href='#disconnect statement'><disconnect statement></a>
<li> EXECUTE <a href='#execute statement'><execute statement></a>
<li> EXECUTE IMMEDIATE <a href='#execute immediate statement'><execute immediate statement></a>
<li> FETCH cursor <a href='#fetch statement'><fetch statement></a> <a href='#dynamic fetch statement'><dynamic fetch statement></a>
<li> GET DIAGNOSTICS <a href='#get diagnostics statement'><get diagnostics statement></a>
<li> GRANT <a href='#grant statement'><grant statement></a>
<li> INSERT <a href='#insert statement'><insert statement></a>
<li> Literal <a href='#literal'><literal></a>
<li> MODULE <a href='#module'><module></a>
<li> OPEN cursor <a href='#open statement'><open statement></a> <a href='#dynamic open statement'><dynamic open statement></a>
<li> PREPARE <a href='#prepare statement'><prepare statement></a>
<li> Preparable statement <a href='#preparable statement'><preparable statement></a>
<li> REVOKE <a href='#revoke statement'><revoke statement></a>
<li> ROLLBACK WORK <a href='#rollback statement'><rollback statement></a>
<li> Search condition <a href='#search condition'><search condition></a>
<li> SELECT <a href='#query specification'><query specification></a>
<li> SET CATALOG <a href='#set catalog statement'><set catalog statement></a>
<li> SET CONNECTION <a href='#set connection statement'><set connection statement></a>
<li> SET CONSTRAINTS <a href='#set constraints mode statement'><set constraints mode statement></a>
<li> SET NAMES <a href='#set names statement'><set names statement></a>
<li> SET SCHEMA <a href='#set schema statement'><set schema statement></a>
<li> SET SESSION AUTHORIZATION <a href='#set session authorization identifier statement'><set session authorization identifier statement></a>
<li> SET TIME ZONE <a href='#set local time zone statement'><set local time zone statement></a>
<li> SET TRANSACTION <a href='#set transaction statement'><set transaction statement></a>
<li> UPDATE <a href='#update statement: positioned'><update statement: positioned></a> <a href='#update statement: searched'><update statement: searched></a> <a href='#dynamic update statement: positioned'><dynamic update statement: positioned></a>
<li> Value expression <a href='#value expression'><value expression></a>
</bl>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Basic Definitions of Characters Used, Tokens, Symbols, Etc.
</h2>
<p><a href="#xref-SQL terminal character" name="SQL terminal character"> <SQL terminal character> </a> ::=
<br> <a href='#SQL language character'><SQL language character></a><br> | <a href='#SQL embedded language character'><SQL embedded language character></a>
<p><a href="#xref-SQL language character" name="SQL language character"> <SQL language character> </a> ::=
<br> <a href='#simple Latin letter'><simple Latin letter></a><br> | <a href='#digit'><digit></a><br> | <a href='#SQL special character'><SQL special character></a>
<p><a href="#xref-simple Latin letter" name="simple Latin letter"> <simple Latin letter> </a> ::=
<br> <a href='#simple Latin upper case letter'><simple Latin upper case letter></a><br> | <a href='#simple Latin lower case letter'><simple Latin lower case letter></a>
<p><a href="#xref-simple Latin upper case letter" name="simple Latin upper case letter"> <simple Latin upper case letter> </a> ::=
<br> <a href="#xref-A"> A </a> | <a href="#xref-B"> B </a> | <a href="#xref-C"> C </a> | <a href="#xref-D"> D </a> | <a href="#xref-E"> E </a> | <a href="#xref-F"> F </a> | <a href="#xref-G"> G </a> | <a href="#xref-H"> H </a> | <a href="#xref-I"> I </a> | <a href="#xref-J"> J </a> | <a href="#xref-K"> K </a> | <a href="#xref-L"> L </a> | <a href="#xref-M"> M </a> | <a href="#xref-N"> N </a> | <a href="#xref-O"> O </a> | <a href="#xref-P"> P </a> | <a href="#xref-Q"> Q </a> | <a href="#xref-R"> R </a> | <a href="#xref-S"> S </a> | <a href="#xref-T"> T </a> | <a href="#xref-U"> U </a> | <a href="#xref-V"> V </a> | <a href="#xref-W"> W </a> | <a href="#xref-X"> X </a> | <a href="#xref-Y"> Y </a> | <a href="#xref-Z"> Z </a>
<p><a href="#xref-simple Latin lower case letter" name="simple Latin lower case letter"> <simple Latin lower case letter> </a> ::=
<br> <a href="#xref-a"> a </a> | <a href="#xref-b"> b </a> | <a href="#xref-c"> c </a> | <a href="#xref-d"> d </a> | <a href="#xref-e"> e </a> | <a href="#xref-f"> f </a> | <a href="#xref-g"> g </a> | <a href="#xref-h"> h </a> | <a href="#xref-i"> i </a> | <a href="#xref-j"> j </a> | <a href="#xref-k"> k </a> | <a href="#xref-l"> l </a> | <a href="#xref-m"> m </a> | <a href="#xref-n"> n </a> | <a href="#xref-o"> o </a> | <a href="#xref-p"> p </a> | <a href="#xref-q"> q </a> | <a href="#xref-r"> r </a> | <a href="#xref-s"> s </a> | <a href="#xref-t"> t </a> | <a href="#xref-u"> u </a> | <a href="#xref-v"> v </a> | <a href="#xref-w"> w </a> | <a href="#xref-x"> x </a> | <a href="#xref-y"> y </a> | <a href="#xref-z"> z </a>
<p><a href="#xref-digit" name="digit"> <digit> </a> ::=
<br> <a href="#xref-0"> 0 </a> | <a href="#xref-1"> 1 </a> | <a href="#xref-2"> 2 </a> | <a href="#xref-3"> 3 </a> | <a href="#xref-4"> 4 </a> | <a href="#xref-5"> 5 </a> | <a href="#xref-6"> 6 </a> | <a href="#xref-7"> 7 </a> | <a href="#xref-8"> 8 </a> | <a href="#xref-9"> 9 </a>
<p><a href="#xref-SQL special character" name="SQL special character"> <SQL special character> </a> ::=
<br> <a href='#space'><space></a><br> | <a href='#double quote'><double quote></a><br> | <a href='#percent'><percent></a><br> | <a href='#ampersand'><ampersand></a><br> | <a href='#quote'><quote></a><br> | <a href='#left paren'><left paren></a><br> | <a href='#right paren'><right paren></a><br> | <a href='#asterisk'><asterisk></a><br> | <a href='#plus sign'><plus sign></a><br> | <a href='#comma'><comma></a><br> | <a href='#minus sign'><minus sign></a><br> | <a href='#period'><period></a><br> | <a href='#solidus'><solidus></a><br> | <a href='#colon'><colon></a><br> | <a href='#semicolon'><semicolon></a><br> | <a href='#less than operator'><less than operator></a><br> | <a href='#greater than operator'><greater than operator></a><br> | <a href='#equals operator'><equals operator></a><br> | <a href='#question mark'><question mark></a><br> | <a href='#underscore'><underscore></a><br> | <a href='#vertical bar'><vertical bar></a>
<p><a href="#xref-space" name="space"> <space> </a> ::= <font color="red"> !! space character in character set in use </font>
<p><a href="#xref-double quote" name="double quote"> <double quote> </a> ::= "
<p><a href="#xref-percent" name="percent"> <percent> </a> ::= %
<p><a href="#xref-ampersand" name="ampersand"> <ampersand> </a> ::= &
<p><a href="#xref-quote" name="quote"> <quote> </a> ::= '
<p><a href="#xref-left paren" name="left paren"> <left paren> </a> ::= (
<p><a href="#xref-right paren" name="right paren"> <right paren> </a> ::= )
<p><a href="#xref-asterisk" name="asterisk"> <asterisk> </a> ::= *
<p><a href="#xref-plus sign" name="plus sign"> <plus sign> </a> ::= +
<p><a href="#xref-comma" name="comma"> <comma> </a> ::= ,
<p><a href="#xref-minus sign" name="minus sign"> <minus sign> </a> ::= -
<p><a href="#xref-period" name="period"> <period> </a> ::= .
<p><a href="#xref-solidus" name="solidus"> <solidus> </a> ::= /
<p><a href="#xref-colon" name="colon"> <colon> </a> ::= :
<p><a href="#xref-semicolon" name="semicolon"> <semicolon> </a> ::= ;
<p><a href="#xref-less than operator" name="less than operator"> <less than operator> </a> ::= <
<p><a href="#xref-equals operator" name="equals operator"> <equals operator> </a> ::= =
<p><a href="#xref-greater than operator" name="greater than operator"> <greater than operator> </a> ::= >
<p><a href="#xref-question mark" name="question mark"> <question mark> </a> ::= ?
<p><a href="#xref-underscore" name="underscore"> <underscore> </a> ::= <a href="#xref-_"> _ </a>
<p><a href="#xref-vertical bar" name="vertical bar"> <vertical bar> </a> ::= |
<p><a href="#xref-SQL embedded language character" name="SQL embedded language character"> <SQL embedded language character> </a> ::= <a href='#left bracket'><left bracket></a> | <a href='#right bracket'><right bracket></a>
<p><a href="#xref-left bracket" name="left bracket"> <left bracket> </a> ::= [
<p><a href="#xref-right bracket" name="right bracket"> <right bracket> </a> ::= ]
<p><a href="#xref-token" name="token"> <token> </a> ::=
<br> <a href='#nondelimiter token'><nondelimiter token></a><br> | <a href='#delimiter token'><delimiter token></a>
<p><a href="#xref-nondelimiter token" name="nondelimiter token"> <nondelimiter token> </a> ::=
<br> <a href='#regular identifier'><regular identifier></a><br> | <a href='#key word'><key word></a><br> | <a href='#unsigned numeric literal'><unsigned numeric literal></a><br> | <a href='#national character string literal'><national character string literal></a><br> | <a href='#bit string literal'><bit string literal></a><br> | <a href='#hex string literal'><hex string literal></a>
<p><a href="#xref-regular identifier" name="regular identifier"> <regular identifier> </a> ::= <a href='#identifier body'><identifier body></a>
<p><a href="#xref-identifier body" name="identifier body"> <identifier body> </a> ::= <a href='#identifier start'><identifier start></a> [ { <a href='#underscore'><underscore></a> | <a href='#identifier part'><identifier part></a> } ... ]
<p><a href="#xref-identifier start" name="identifier start"> <identifier start> </a> ::= <font color="red"> !! See the Syntax rules </font>
<p><a href="#xref-identifier part" name="identifier part"> <identifier part> </a> ::= <a href='#identifier start'><identifier start></a> | <a href='#digit'><digit></a>
<p><a href="#xref-key word" name="key word"> <key word> </a> ::= <a href='#reserved word'><reserved word></a> | <a href='#non-reserved word'><non-reserved word></a>
<p><a href="#xref-reserved word" name="reserved word"> <reserved word> </a> ::=
<br> <a href="#xref-ABSOLUTE"> ABSOLUTE </a> | <a href="#xref-ACTION"> ACTION </a> | <a href="#xref-ADD"> ADD </a> | <a href="#xref-ALL"> ALL </a> | <a href="#xref-ALLOCATE"> ALLOCATE </a> | <a href="#xref-ALTER"> ALTER </a> | <a href="#xref-AND"> AND </a> | <a href="#xref-ANY"> ANY </a> | <a href="#xref-ARE"> ARE </a><br> | <a href="#xref-AS"> AS </a> | <a href="#xref-ASC"> ASC </a> | <a href="#xref-ASSERTION"> ASSERTION </a> | <a href="#xref-AT"> AT </a> | <a href="#xref-AUTHORIZATION"> AUTHORIZATION </a> | <a href="#xref-AVG"> AVG </a><br> | <a href="#xref-BEGIN"> BEGIN </a> | <a href="#xref-BETWEEN"> BETWEEN </a> | <a href="#xref-BIT"> BIT </a> | <a href="#xref-BIT_LENGTH"> BIT_LENGTH </a> | <a href="#xref-BOTH"> BOTH </a> | <a href="#xref-BY"> BY </a><br> | <a href="#xref-CASCADE"> CASCADE </a> | <a href="#xref-CASCADED"> CASCADED </a> | <a href="#xref-CASE"> CASE </a> | <a href="#xref-CAST"> CAST </a> | <a href="#xref-CATALOG"> CATALOG </a> | <a href="#xref-CHAR"> CHAR </a> | <a href="#xref-CHARACTER"> CHARACTER </a> | <a href="#xref-CHARACTER_LENGTH"> CHARACTER_LENGTH </a><br> | <a href="#xref-CHAR_LENGTH"> CHAR_LENGTH </a> | <a href="#xref-CHECK"> CHECK </a> | <a href="#xref-CLOSE"> CLOSE </a> | <a href="#xref-COALESCE"> COALESCE </a> | <a href="#xref-COLLATE"> COLLATE </a> | <a href="#xref-COLLATION"> COLLATION </a> | <a href="#xref-COLUMN"> COLUMN </a> | <a href="#xref-COMMIT"> COMMIT </a><br> | <a href="#xref-CONNECT"> CONNECT </a> | <a href="#xref-CONNECTION"> CONNECTION </a> | <a href="#xref-CONSTRAINT"> CONSTRAINT </a> | <a href="#xref-CONSTRAINTS"> CONSTRAINTS </a> | <a href="#xref-CONTINUE"> CONTINUE </a> | <a href="#xref-CONVERT"> CONVERT </a> | <a href="#xref-CORRESPONDING"> CORRESPONDING </a><br> | <a href="#xref-CREATE"> CREATE </a> | <a href="#xref-CROSS"> CROSS </a> | <a href="#xref-CURRENT"> CURRENT </a> | <a href="#xref-CURRENT_DATE"> CURRENT_DATE </a> | <a href="#xref-CURRENT_TIME"> CURRENT_TIME </a> | <a href="#xref-CURRENT_TIMESTAMP"> CURRENT_TIMESTAMP </a> | <a href="#xref-CURRENT_USER"> CURRENT_USER </a> | <a href="#xref-CURSOR"> CURSOR </a><br> | <a href="#xref-DATE"> DATE </a> | <a href="#xref-DAY"> DAY </a> | <a href="#xref-DEALLOCATE"> DEALLOCATE </a> | <a href="#xref-DEC"> DEC </a> | <a href="#xref-DECIMAL"> DECIMAL </a> | <a href="#xref-DECLARE"> DECLARE </a> | <a href="#xref-DEFAULT"> DEFAULT </a><br> | <a href="#xref-DEFERRABLE"> DEFERRABLE </a> | <a href="#xref-DEFERRED"> DEFERRED </a> | <a href="#xref-DELETE"> DELETE </a> | <a href="#xref-DESC"> DESC </a> | <a href="#xref-DESCRIBE"> DESCRIBE </a> | <a href="#xref-DESCRIPTOR"> DESCRIPTOR </a> | <a href="#xref-DIAGNOSTICS"> DIAGNOSTICS </a><br> | <a href="#xref-DISCONNECT"> DISCONNECT </a> | <a href="#xref-DISTINCT"> DISTINCT </a> | <a href="#xref-DOMAIN"> DOMAIN </a> | <a href="#xref-DOUBLE"> DOUBLE </a> | <a href="#xref-DROP"> DROP </a><br> | <a href="#xref-ELSE"> ELSE </a> | <a href="#xref-END"> END </a> | <a href="#xref-END-EXEC"> END-EXEC </a> | <a href="#xref-ESCAPE"> ESCAPE </a> | <a href="#xref-EXCEPT"> EXCEPT </a> | <a href="#xref-EXCEPTION"> EXCEPTION </a> | <a href="#xref-EXEC"> EXEC </a> | <a href="#xref-EXECUTE"> EXECUTE </a> | <a href="#xref-EXISTS"> EXISTS </a> | <a href="#xref-EXTERNAL"> EXTERNAL </a> | <a href="#xref-EXTRACT"> EXTRACT </a><br> | <a href="#xref-FALSE"> FALSE </a> | <a href="#xref-FETCH"> FETCH </a> | <a href="#xref-FIRST"> FIRST </a> | <a href="#xref-FLOAT"> FLOAT </a> | <a href="#xref-FOR"> FOR </a> | <a href="#xref-FOREIGN"> FOREIGN </a> | <a href="#xref-FOUND"> FOUND </a> | <a href="#xref-FROM"> FROM </a> | <a href="#xref-FULL"> FULL </a><br> | <a href="#xref-GET"> GET </a> | <a href="#xref-GLOBAL"> GLOBAL </a> | <a href="#xref-GO"> GO </a> | <a href="#xref-GOTO"> GOTO </a> | <a href="#xref-GRANT"> GRANT </a> | <a href="#xref-GROUP"> GROUP </a><br> | <a href="#xref-HAVING"> HAVING </a> | <a href="#xref-HOUR"> HOUR </a><br> | <a href="#xref-IDENTITY"> IDENTITY </a> | <a href="#xref-IMMEDIATE"> IMMEDIATE </a> | <a href="#xref-IN"> IN </a> | <a href="#xref-INDICATOR"> INDICATOR </a> | <a href="#xref-INITIALLY"> INITIALLY </a> | <a href="#xref-INNER"> INNER </a> | <a href="#xref-INPUT"> INPUT </a> | <a href="#xref-INSENSITIVE"> INSENSITIVE </a><br> | <a href="#xref-INSERT"> INSERT </a> | <a href="#xref-INT"> INT </a> | <a href="#xref-INTEGER"> INTEGER </a> | <a href="#xref-INTERSECT"> INTERSECT </a> | <a href="#xref-INTERVAL"> INTERVAL </a> | <a href="#xref-INTO"> INTO </a> | <a href="#xref-IS"> IS </a> | <a href="#xref-ISOLATION"> ISOLATION </a><br> | <a href="#xref-JOIN"> JOIN </a><br> | <a href="#xref-KEY"> KEY </a><br> | <a href="#xref-LANGUAGE"> LANGUAGE </a> | <a href="#xref-LAST"> LAST </a> | <a href="#xref-LEADING"> LEADING </a> | <a href="#xref-LEFT"> LEFT </a> | <a href="#xref-LEVEL"> LEVEL </a> | <a href="#xref-LIKE"> LIKE </a> | <a href="#xref-LOCAL"> LOCAL </a> | <a href="#xref-LOWER"> LOWER </a><br> | <a href="#xref-MATCH"> MATCH </a> | <a href="#xref-MAX"> MAX </a> | <a href="#xref-MIN"> MIN </a> | <a href="#xref-MINUTE"> MINUTE </a> | <a href="#xref-MODULE"> MODULE </a> | <a href="#xref-MONTH"> MONTH </a><br> | <a href="#xref-NAMES"> NAMES </a> | <a href="#xref-NATIONAL"> NATIONAL </a> | <a href="#xref-NATURAL"> NATURAL </a> | <a href="#xref-NCHAR"> NCHAR </a> | <a href="#xref-NEXT"> NEXT </a> | <a href="#xref-NO"> NO </a> | <a href="#xref-NOT"> NOT </a> | <a href="#xref-NULL"> NULL </a> | <a href="#xref-NULLIF"> NULLIF </a> | <a href="#xref-NUMERIC"> NUMERIC </a><br> | <a href="#xref-OCTET_LENGTH"> OCTET_LENGTH </a> | <a href="#xref-OF"> OF </a> | <a href="#xref-ON"> ON </a> | <a href="#xref-ONLY"> ONLY </a> | <a href="#xref-OPEN"> OPEN </a> | <a href="#xref-OPTION"> OPTION </a> | <a href="#xref-OR"> OR </a> | <a href="#xref-ORDER"> ORDER </a> | <a href="#xref-OUTER"> OUTER </a> | <a href="#xref-OUTPUT"> OUTPUT </a> | <a href="#xref-OVERLAPS"> OVERLAPS </a><br> | <a href="#xref-PAD"> PAD </a> | <a href="#xref-PARTIAL"> PARTIAL </a> | <a href="#xref-POSITION"> POSITION </a> | <a href="#xref-PRECISION"> PRECISION </a> | <a href="#xref-PREPARE"> PREPARE </a> | <a href="#xref-PRESERVE"> PRESERVE </a> | <a href="#xref-PRIMARY"> PRIMARY </a> | <a href="#xref-PRIOR"> PRIOR </a> | <a href="#xref-PRIVILEGES"> PRIVILEGES </a> | <a href="#xref-PROCEDURE"> PROCEDURE </a> | <a href="#xref-PUBLIC"> PUBLIC </a><br> | <a href="#xref-READ"> READ </a> | <a href="#xref-REAL"> REAL </a> | <a href="#xref-REFERENCES"> REFERENCES </a> | <a href="#xref-RELATIVE"> RELATIVE </a> | <a href="#xref-RESTRICT"> RESTRICT </a> | <a href="#xref-REVOKE"> REVOKE </a> | <a href="#xref-RIGHT"> RIGHT </a> | <a href="#xref-ROLLBACK"> ROLLBACK </a> | <a href="#xref-ROWS"> ROWS </a><br> | <a href="#xref-SCHEMA"> SCHEMA </a> | <a href="#xref-SCROLL"> SCROLL </a> | <a href="#xref-SECOND"> SECOND </a> | <a href="#xref-SECTION"> SECTION </a> | <a href="#xref-SELECT"> SELECT </a> | <a href="#xref-SESSION"> SESSION </a> | <a href="#xref-SESSION_USER"> SESSION_USER </a> | <a href="#xref-SET"> SET </a><br> | <a href="#xref-SIZE"> SIZE </a> | <a href="#xref-SMALLINT"> SMALLINT </a> | <a href="#xref-SOME"> SOME </a> | <a href="#xref-SPACE"> SPACE </a> | <a href="#xref-SQL"> SQL </a> | <a href="#xref-SQLCODE"> SQLCODE </a> | <a href="#xref-SQLERROR"> SQLERROR </a> | <a href="#xref-SQLSTATE"> SQLSTATE </a> | <a href="#xref-SUBSTRING"> SUBSTRING </a> | <a href="#xref-SUM"> SUM </a> | <a href="#xref-SYSTEM_USER"> SYSTEM_USER </a><br> | <a href="#xref-TABLE"> TABLE </a> | <a href="#xref-TEMPORARY"> TEMPORARY </a> | <a href="#xref-THEN"> THEN </a> | <a href="#xref-TIME"> TIME </a> | <a href="#xref-TIMESTAMP"> TIMESTAMP </a> | <a href="#xref-TIMEZONE_HOUR"> TIMEZONE_HOUR </a> | <a href="#xref-TIMEZONE_MINUTE"> TIMEZONE_MINUTE </a><br> | <a href="#xref-TO"> TO </a> | <a href="#xref-TRAILING"> TRAILING </a> | <a href="#xref-TRANSACTION"> TRANSACTION </a> | <a href="#xref-TRANSLATE"> TRANSLATE </a> | <a href="#xref-TRANSLATION"> TRANSLATION </a> | <a href="#xref-TRIM"> TRIM </a> | <a href="#xref-TRUE"> TRUE </a><br> | <a href="#xref-UNION"> UNION </a> | <a href="#xref-UNIQUE"> UNIQUE </a> | <a href="#xref-UNKNOWN"> UNKNOWN </a> | <a href="#xref-UPDATE"> UPDATE </a> | <a href="#xref-UPPER"> UPPER </a> | <a href="#xref-USAGE"> USAGE </a> | <a href="#xref-USER"> USER </a> | <a href="#xref-USING"> USING </a><br> | <a href="#xref-VALUE"> VALUE </a> | <a href="#xref-VALUES"> VALUES </a> | <a href="#xref-VARCHAR"> VARCHAR </a> | <a href="#xref-VARYING"> VARYING </a> | <a href="#xref-VIEW"> VIEW </a><br> | <a href="#xref-WHEN"> WHEN </a> | <a href="#xref-WHENEVER"> WHENEVER </a> | <a href="#xref-WHERE"> WHERE </a> | <a href="#xref-WITH"> WITH </a> | <a href="#xref-WORK"> WORK </a> | <a href="#xref-WRITE"> WRITE </a><br> | <a href="#xref-YEAR"> YEAR </a><br> | <a href="#xref-ZONE"> ZONE </a>
<p><a href="#xref-non-reserved word" name="non-reserved word"> <non-reserved word> </a> ::=
<br> <a href="#xref-ADA"> ADA </a><br> | <a href="#xref-C"> C </a> | <a href="#xref-CATALOG_NAME"> CATALOG_NAME </a> | <a href="#xref-CHARACTER_SET_CATALOG"> CHARACTER_SET_CATALOG </a> | <a href="#xref-CHARACTER_SET_NAME"> CHARACTER_SET_NAME </a> | <a href="#xref-CHARACTER_SET_SCHEMA"> CHARACTER_SET_SCHEMA </a><br> | <a href="#xref-CLASS_ORIGIN"> CLASS_ORIGIN </a> | <a href="#xref-COBOL"> COBOL </a> | <a href="#xref-COLLATION_CATALOG"> COLLATION_CATALOG </a> | <a href="#xref-COLLATION_NAME"> COLLATION_NAME </a> | <a href="#xref-COLLATION_SCHEMA"> COLLATION_SCHEMA </a><br> | <a href="#xref-COLUMN_NAME"> COLUMN_NAME </a> | <a href="#xref-COMMAND_FUNCTION"> COMMAND_FUNCTION </a> | <a href="#xref-COMMITTED"> COMMITTED </a> | <a href="#xref-CONDITION_NUMBER"> CONDITION_NUMBER </a> | <a href="#xref-CONNECTION_NAME"> CONNECTION_NAME </a><br> | <a href="#xref-CONSTRAINT_CATALOG"> CONSTRAINT_CATALOG </a> | <a href="#xref-CONSTRAINT_NAME"> CONSTRAINT_NAME </a> | <a href="#xref-CONSTRAINT_SCHEMA"> CONSTRAINT_SCHEMA </a> | <a href="#xref-CURSOR_NAME"> CURSOR_NAME </a><br> | <a href="#xref-DATA"> DATA </a> | <a href="#xref-DATETIME_INTERVAL_CODE"> DATETIME_INTERVAL_CODE </a> | <a href="#xref-DATETIME_INTERVAL_PRECISION"> DATETIME_INTERVAL_PRECISION </a> | <a href="#xref-DYNAMIC_FUNCTION"> DYNAMIC_FUNCTION </a><br> | <a href="#xref-FORTRAN"> FORTRAN </a><br> | <a href="#xref-LENGTH"> LENGTH </a><br> | <a href="#xref-MESSAGE_LENGTH"> MESSAGE_LENGTH </a> | <a href="#xref-MESSAGE_OCTET_LENGTH"> MESSAGE_OCTET_LENGTH </a> | <a href="#xref-MESSAGE_TEXT"> MESSAGE_TEXT </a> | <a href="#xref-MORE"> MORE </a> | <a href="#xref-MUMPS"> MUMPS </a><br> | <a href="#xref-NAME"> NAME </a> | <a href="#xref-NULLABLE"> NULLABLE </a> | <a href="#xref-NUMBER"> NUMBER </a><br> | <a href="#xref-PASCAL"> PASCAL </a> | <a href="#xref-PLI"> PLI </a><br> | <a href="#xref-REPEATABLE"> REPEATABLE </a> | <a href="#xref-RETURNED_LENGTH"> RETURNED_LENGTH </a> | <a href="#xref-RETURNED_OCTET_LENGTH"> RETURNED_OCTET_LENGTH </a> | <a href="#xref-RETURNED_SQLSTATE"> RETURNED_SQLSTATE </a> | <a href="#xref-ROW_COUNT"> ROW_COUNT </a><br> | <a href="#xref-SCALE"> SCALE </a> | <a href="#xref-SCHEMA_NAME"> SCHEMA_NAME </a> | <a href="#xref-SERIALIZABLE"> SERIALIZABLE </a> | <a href="#xref-SERVER_NAME"> SERVER_NAME </a> | <a href="#xref-SUBCLASS_ORIGIN"> SUBCLASS_ORIGIN </a><br> | <a href="#xref-TABLE_NAME"> TABLE_NAME </a> | <a href="#xref-TYPE"> TYPE </a><br> | <a href="#xref-UNCOMMITTED"> UNCOMMITTED </a> | <a href="#xref-UNNAMED"> UNNAMED </a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Literal Numbers, Strings, Dates and Times
</h2>
<p><a href="#xref-unsigned numeric literal" name="unsigned numeric literal"> <unsigned numeric literal> </a> ::=
<br> <a href='#exact numeric literal'><exact numeric literal></a><br> | <a href='#approximate numeric literal'><approximate numeric literal></a>
<p><a href="#xref-exact numeric literal" name="exact numeric literal"> <exact numeric literal> </a> ::=
<br> <a href='#unsigned integer'><unsigned integer></a> [ <a href='#period'><period></a> [ <a href='#unsigned integer'><unsigned integer></a> ] ]<br> | <a href='#period'><period></a> <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-unsigned integer" name="unsigned integer"> <unsigned integer> </a> ::= <a href='#digit'><digit></a> ...
<p><a href="#xref-approximate numeric literal" name="approximate numeric literal"> <approximate numeric literal> </a> ::=
<br> <a href='#mantissa'><mantissa></a> <a href="#xref-E"> E </a> <a href='#exponent'><exponent></a>
<p><a href="#xref-mantissa" name="mantissa"> <mantissa> </a> ::= <a href='#exact numeric literal'><exact numeric literal></a>
<p><a href="#xref-exponent" name="exponent"> <exponent> </a> ::= <a href='#signed integer'><signed integer></a>
<p><a href="#xref-signed integer" name="signed integer"> <signed integer> </a> ::= [ <a href='#sign'><sign></a> ] <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-sign" name="sign"> <sign> </a> ::= <a href='#plus sign'><plus sign></a> | <a href='#minus sign'><minus sign></a>
<p><a href="#xref-national character string literal" name="national character string literal"> <national character string literal> </a> ::=
<br> <a href="#xref-N"> N </a> <a href='#quote'><quote></a> [ <a href='#character representation'><character representation></a> ... ] <a href='#quote'><quote></a> [ { <a href='#separator'><separator></a> ... <a href='#quote'><quote></a> [ <a href='#character representation'><character representation></a> ... ] <a href='#quote'><quote></a> }... ]
<p><a href="#xref-character representation" name="character representation"> <character representation> </a> ::= <a href='#nonquote character'><nonquote character></a> | <a href='#quote symbol'><quote symbol></a>
<p><a href="#xref-nonquote character" name="nonquote character"> <nonquote character> </a> ::= <font color="red"> !! See the Syntax rules </font>
<p><a href="#xref-quote symbol" name="quote symbol"> <quote symbol> </a> ::= <a href='#quote'><quote></a> <a href='#quote'><quote></a>
<p><a href="#xref-separator" name="separator"> <separator> </a> ::= { <a href='#comment'><comment></a> | <a href='#space'><space></a> | <a href='#newline'><newline></a> }...
<p><a href="#xref-comment" name="comment"> <comment> </a> ::= <a href='#comment introducer'><comment introducer></a> [ <a href='#comment character'><comment character></a> ... ] <a href='#newline'><newline></a>
<p><a href="#xref-comment introducer" name="comment introducer"> <comment introducer> </a> ::= <a href='#minus sign'><minus sign></a> <a href='#minus sign'><minus sign></a> [<minus <a href="#xref-sign"> sign </a> >...]
<p><a href="#xref-comment character" name="comment character"> <comment character> </a> ::= <a href='#nonquote character'><nonquote character></a> | <a href='#quote'><quote></a>
<p><a href="#xref-newline" name="newline"> <newline> </a> ::= <font color="red"> !! implementation defined end of line indicator </font>
<p><a href="#xref-bit string literal" name="bit string literal"> <bit string literal> </a> ::=
<br> <a href="#xref-B"> B </a> <a href='#quote'><quote></a> [ <a href='#bit'><bit></a> ... ] <a href='#quote'><quote></a> [ { <a href='#separator'><separator></a> ... <a href='#quote'><quote></a> [ <a href='#bit'><bit></a> ... ] <a href='#quote'><quote></a> }... ]
<p><a href="#xref-bit" name="bit"> <bit> </a> ::= <a href="#xref-0"> 0 </a> | <a href="#xref-1"> 1 </a>
<p><a href="#xref-hex string literal" name="hex string literal"> <hex string literal> </a> ::=
<br> <a href="#xref-X"> X </a> <a href='#quote'><quote></a> [ <a href='#hexit'><hexit></a> ... ] <a href='#quote'><quote></a> [ { <a href='#separator'><separator></a> ... <a href='#quote'><quote></a> [ <a href='#hexit'><hexit></a> ... ] <a href='#quote'><quote></a> }... ]
<p><a href="#xref-hexit" name="hexit"> <hexit> </a> ::= <a href='#digit'><digit></a> | <a href="#xref-A"> A </a> | <a href="#xref-B"> B </a> | <a href="#xref-C"> C </a> | <a href="#xref-D"> D </a> | <a href="#xref-E"> E </a> | <a href="#xref-F"> F </a> | <a href="#xref-a"> a </a> | <a href="#xref-b"> b </a> | <a href="#xref-c"> c </a> | <a href="#xref-d"> d </a> | <a href="#xref-e"> e </a> | <a href="#xref-f"> f </a>
<p><a href="#xref-delimiter token" name="delimiter token"> <delimiter token> </a> ::=
<br> <a href='#character string literal'><character string literal></a><br> | <a href='#date string'><date string></a><br> | <a href='#time string'><time string></a><br> | <a href='#timestamp string'><timestamp string></a><br> | <a href='#delimited identifier'><delimited identifier></a><br> | <a href='#SQL special character'><SQL special character></a><br> | <a href='#not equals operator'><not equals operator></a><br> | <a href='#greater than or equals operator'><greater than or equals operator></a><br> | <a href='#less than or equals operator'><less than or equals operator></a><br> | <a href='#concatenation operator'><concatenation operator></a><br> | <a href='#double period'><double period></a><br> | <a href='#left bracket'><left bracket></a><br> | <a href='#right bracket'><right bracket></a>
<p><a href="#xref-character string literal" name="character string literal"> <character string literal> </a> ::=
<br> [ <a href='#introducer'><introducer></a> <a href='#character set specification'><character set specification></a> ] <a href='#quote'><quote></a> [ <a href='#character representation'><character representation></a> ... ] <a href='#quote'><quote></a> [ { <a href='#separator'><separator></a> ... <a href='#quote'><quote></a> [ <a href='#character representation'><character representation></a> ... ] <a href='#quote'><quote></a> }... ]
<p><a href="#xref-introducer" name="introducer"> <introducer> </a> ::= <a href='#underscore'><underscore></a>
<p><a href="#xref-character set specification" name="character set specification"> <character set specification> </a> ::=
<br> <a href='#standard character repertoire name'><standard character repertoire name></a><br> | <a href='#implementation-defined character repertoire name'><implementation-defined character repertoire name></a><br> | <a href='#user-defined character repertoire name'><user-defined character repertoire name></a><br> | <a href='#standard universal character form-of-use name'><standard universal character form-of-use name></a><br> | <a href='#implementation-defined universal character form-of-use name'><implementation-defined universal character form-of-use name></a>
<p><a href="#xref-standard character repertoire name" name="standard character repertoire name"> <standard character repertoire name> </a> ::= <a href='#character set name'><character set name></a>
<p><a href="#xref-character set name" name="character set name"> <character set name> </a> ::= [ <a href='#schema name'><schema name></a> <a href='#period'><period></a> ] <a href='#SQL language identifier'><SQL language identifier></a>
<p><a href="#xref-schema name" name="schema name"> <schema name> </a> ::= [ <a href='#catalog name'><catalog name></a> <a href='#period'><period></a> ] <a href='#unqualified schema name'><unqualified schema name></a>
<p><a href="#xref-catalog name" name="catalog name"> <catalog name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-identifier" name="identifier"> <identifier> </a> ::= [ <a href='#introducer'><introducer></a> <a href='#character set specification'><character set specification></a> ] <a href='#actual identifier'><actual identifier></a>
<p><a href="#xref-actual identifier" name="actual identifier"> <actual identifier> </a> ::= <a href='#regular identifier'><regular identifier></a> | <a href='#delimited identifier'><delimited identifier></a>
<p><a href="#xref-delimited identifier" name="delimited identifier"> <delimited identifier> </a> ::= <a href='#double quote'><double quote></a> <a href='#delimited identifier body'><delimited identifier body></a> <a href='#double quote'><double quote></a>
<p><a href="#xref-delimited identifier body" name="delimited identifier body"> <delimited identifier body> </a> ::= <a href='#delimited identifier part'><delimited identifier part></a> ...
<p><a href="#xref-delimited identifier part" name="delimited identifier part"> <delimited identifier part> </a> ::= <a href='#nondoublequote character'><nondoublequote character></a> | <a href='#doublequote symbol'><doublequote symbol></a>
<p><a href="#xref-nondoublequote character" name="nondoublequote character"> <nondoublequote character> </a> ::= <font color="red"> !! See the syntax rules </font>
<p><a href="#xref-doublequote symbol" name="doublequote symbol"> <doublequote symbol> </a> ::= <a href='#double quote'><double quote></a> <a href='#double quote'><double quote></a>
<p><a href="#xref-unqualified schema name" name="unqualified schema name"> <unqualified schema name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-SQL language identifier" name="SQL language identifier"> <SQL language identifier> </a> ::=
<br> <a href='#SQL language identifier start'><SQL language identifier start></a> [ { <a href='#underscore'><underscore></a> | <a href='#SQL language identifier part'><SQL language identifier part></a> }... ]
<p><a href="#xref-SQL language identifier start" name="SQL language identifier start"> <SQL language identifier start> </a> ::= <a href='#simple Latin letter'><simple Latin letter></a>
<p><a href="#xref-SQL language identifier part" name="SQL language identifier part"> <SQL language identifier part> </a> ::= <a href='#simple Latin letter'><simple Latin letter></a> | <a href='#digit'><digit></a>
<p><a href="#xref-implementation-defined character repertoire name" name="implementation-defined character repertoire name"> <implementation-defined character repertoire name> </a> ::= <a href='#character set name'><character set name></a>
<p><a href="#xref-user-defined character repertoire name" name="user-defined character repertoire name"> <user-defined character repertoire name> </a> ::= <a href='#character set name'><character set name></a>
<p><a href="#xref-standard universal character form-of-use name" name="standard universal character form-of-use name"> <standard universal character form-of-use name> </a> ::= <a href='#character set name'><character set name></a>
<p><a href="#xref-implementation-defined universal character form-of-use name" name="implementation-defined universal character form-of-use name"> <implementation-defined universal character form-of-use name> </a> ::= <a href='#character set name'><character set name></a>
<p><a href="#xref-date string" name="date string"> <date string> </a> ::= <a href='#quote'><quote></a> <a href='#date value'><date value></a> <a href='#quote'><quote></a>
<p><a href="#xref-date value" name="date value"> <date value> </a> ::= <a href='#years value'><years value></a> <a href='#minus sign'><minus sign></a> <a href='#months value'><months value></a> <a href='#minus sign'><minus sign></a> <a href='#days value'><days value></a>
<p><a href="#xref-years value" name="years value"> <years value> </a> ::= <a href='#datetime value'><datetime value></a>
<p><a href="#xref-datetime value" name="datetime value"> <datetime value> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-months value" name="months value"> <months value> </a> ::= <a href='#datetime value'><datetime value></a>
<p><a href="#xref-days value" name="days value"> <days value> </a> ::= <a href='#datetime value'><datetime value></a>
<p><a href="#xref-time string" name="time string"> <time string> </a> ::= <a href='#quote'><quote></a> <a href='#time value'><time value></a> [ <a href='#time zone interval'><time zone interval></a> ] <a href='#quote'><quote></a>
<p><a href="#xref-time value" name="time value"> <time value> </a> ::= <a href='#hours value'><hours value></a> <a href='#colon'><colon></a> <a href='#minutes value'><minutes value></a> <a href='#colon'><colon></a> <a href='#seconds value'><seconds value></a>
<p><a href="#xref-hours value" name="hours value"> <hours value> </a> ::= <a href='#datetime value'><datetime value></a>
<p><a href="#xref-minutes value" name="minutes value"> <minutes value> </a> ::= <a href='#datetime value'><datetime value></a>
<p><a href="#xref-seconds value" name="seconds value"> <seconds value> </a> ::= <a href='#seconds integer value'><seconds integer value></a> [ <a href='#period'><period></a> [ <a href='#seconds fraction'><seconds fraction></a> ] ]
<p><a href="#xref-seconds integer value" name="seconds integer value"> <seconds integer value> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-seconds fraction" name="seconds fraction"> <seconds fraction> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-time zone interval" name="time zone interval"> <time zone interval> </a> ::= <a href='#sign'><sign></a> <a href='#hours value'><hours value></a> <a href='#colon'><colon></a> <a href='#minutes value'><minutes value></a>
<p><a href="#xref-timestamp string" name="timestamp string"> <timestamp string> </a> ::= <a href='#quote'><quote></a> <a href='#date value'><date value></a> <a href='#space'><space></a> <a href='#time value'><time value></a> [ <a href='#time zone interval'><time zone interval></a> ] <a href='#quote'><quote></a>
<p><a href="#xref-interval string" name="interval string"> <interval string> </a> ::= <a href='#quote'><quote></a> { <a href='#year-month literal'><year-month literal></a> | <a href='#day-time literal'><day-time literal></a> } <a href='#quote'><quote></a>
<p><a href="#xref-year-month literal" name="year-month literal"> <year-month literal> </a> ::=
<br> <a href='#years value'><years value></a><br> | [ <a href='#years value'><years value></a> <a href='#minus sign'><minus sign></a> ] <a href='#months value'><months value></a>
<p><a href="#xref-day-time literal" name="day-time literal"> <day-time literal> </a> ::= <a href='#day-time interval'><day-time interval></a> | <a href='#time interval'><time interval></a>
<p><a href="#xref-day-time interval" name="day-time interval"> <day-time interval> </a> ::=
<br> <a href='#days value'><days value></a> [ <a href='#space'><space></a> <a href='#hours value'><hours value></a> [ <a href='#colon'><colon></a> <a href='#minutes value'><minutes value></a> [ <a href='#colon'><colon></a> <a href='#seconds value'><seconds value></a> ] ] ]
<p><a href="#xref-time-interval" name="time-interval"> <time-interval> </a> ::=
<br> <a href='#hours value'><hours value></a> [ <a href='#colon'><colon></a> <a href='#minutes value'><minutes value></a> [ <a href='#colon'><colon></a> <a href='#seconds value'><seconds value></a> ] ]<br> | <a href='#minutes value'><minutes value></a> [ <a href='#colon'><colon></a> <a href='#seconds value'><seconds value></a> ]<br> | <a href='#seconds value'><seconds value></a>
<p><a href="#xref-not equals operator" name="not equals operator"> <not equals operator> </a> ::= <>
<p><a href="#xref-greater than or equals operator" name="greater than or equals operator"> <greater than or equals operator> </a> ::= >=
<p><a href="#xref-less than or equals operator" name="less than or equals operator"> <less than or equals operator> </a> ::= <=
<p><a href="#xref-concatenation operator" name="concatenation operator"> <concatenation operator> </a> ::= ||
<p><a href="#xref-double period" name="double period"> <double period> </a> ::= ..
<p><a href='#top'>Top</a></p>
<hr>
<h2> SQL Module
</h2>
<p><a href="#xref-module" name="module"> <module> </a> ::=
<br> <a href='#module name clause'><module name clause></a> <a href='#language clause'><language clause></a> <a href='#module authorization clause'><module authorization clause></a><br> [ <a href='#temporary table declaration'><temporary table declaration></a> ... ]<br> <a href='#module contents'><module contents></a> ...
<p><a href="#xref-module name clause" name="module name clause"> <module name clause> </a> ::=
<br> <a href="#xref-MODULE"> MODULE </a> [ <a href='#module name'><module name></a> ] [ <a href='#module character set specification'><module character set specification></a> ]
<p><a href="#xref-module name" name="module name"> <module name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-module character set specification" name="module character set specification"> <module character set specification> </a> ::= <a href="#xref-NAMES"> NAMES </a> <a href="#xref-ARE"> ARE </a> <a href='#character set specification'><character set specification></a>
<p><a href="#xref-language clause" name="language clause"> <language clause> </a> ::= <a href="#xref-LANGUAGE"> LANGUAGE </a> <a href='#language name'><language name></a>
<p><a href="#xref-language name" name="language name"> <language name> </a> ::= <a href="#xref-ADA"> ADA </a> | <a href="#xref-C"> C </a> | <a href="#xref-COBOL"> COBOL </a> | <a href="#xref-FORTRAN"> FORTRAN </a> | <a href="#xref-MUMPS"> MUMPS </a> | <a href="#xref-PASCAL"> PASCAL </a> | <a href="#xref-PLI"> PLI </a>
<p><a href="#xref-module authorization clause" name="module authorization clause"> <module authorization clause> </a> ::=
<br> <a href="#xref-SCHEMA"> SCHEMA </a> <a href='#schema name'><schema name></a><br> | <a href="#xref-AUTHORIZATION"> AUTHORIZATION </a> <a href='#module authorization identifier'><module authorization identifier></a><br> | <a href="#xref-SCHEMA"> SCHEMA </a> <a href='#schema name'><schema name></a> <a href="#xref-AUTHORIZATION"> AUTHORIZATION </a> <a href='#module authorization identifier'><module authorization identifier></a>
<p><a href="#xref-module authorization identifier" name="module authorization identifier"> <module authorization identifier> </a> ::= <a href='#authorization identifier'><authorization identifier></a>
<p><a href="#xref-authorization identifier" name="authorization identifier"> <authorization identifier> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-temporary table declaration" name="temporary table declaration"> <temporary table declaration> </a> ::=
<br> <a href="#xref-DECLARE"> DECLARE </a> <a href="#xref-LOCAL"> LOCAL </a> <a href="#xref-TEMPORARY"> TEMPORARY </a> <a href="#xref-TABLE"> TABLE </a> <a href='#qualified local table name'><qualified local table name></a> <a href='#table element list'><table element list></a> [ <a href="#xref-ON"> ON </a> <a href="#xref-COMMIT"> COMMIT </a> { <a href="#xref-PRESERVE"> PRESERVE </a> | <a href="#xref-DELETE"> DELETE </a> } <a href="#xref-ROWS"> ROWS </a> ]
<p><a href="#xref-qualified local table name" name="qualified local table name"> <qualified local table name> </a> ::= <a href="#xref-MODULE"> MODULE </a> <a href='#period'><period></a> <a href='#local table name'><local table name></a>
<p><a href="#xref-local table name" name="local table name"> <local table name> </a> ::= <a href='#qualified identifier'><qualified identifier></a>
<p><a href="#xref-qualified identifier" name="qualified identifier"> <qualified identifier> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-table element list" name="table element list"> <table element list> </a> ::= <a href='#left paren'><left paren></a> <a href='#table element'><table element></a> [ { <a href='#comma'><comma></a> <a href='#table element'><table element></a> }... ] <a href='#right paren'><right paren></a>
<p><a href="#xref-table element" name="table element"> <table element> </a> ::= <a href='#column definition'><column definition></a> | <a href='#table constraint definition'><table constraint definition></a>
<p><a href="#xref-column definition" name="column definition"> <column definition> </a> ::=
<br> <a href='#column name'><column name></a> { <a href='#data type'><data type></a> | <a href='#domain name'><domain name></a> } [ <a href='#default clause'><default clause></a> ] [ <a href='#column constraint definition'><column constraint definition></a> ... ] [ <a href='#collate clause'><collate clause></a> ]
<p><a href="#xref-column name" name="column name"> <column name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Data Types
</h2>
<p><a href="#xref-data type" name="data type"> <data type> </a> ::=
<br> <a href='#character string type'><character string type></a> [ <a href="#xref-CHARACTER"> CHARACTER </a> <a href="#xref-SET"> SET </a> <a href='#character set specification'><character set specification></a> ]<br> | <a href='#national character string type'><national character string type></a><br> | <a href='#bit string type'><bit string type></a><br> | <a href='#numeric type'><numeric type></a><br> | <a href='#datetime type'><datetime type></a><br> | <a href='#interval type'><interval type></a>
<p><a href="#xref-character string type" name="character string type"> <character string type> </a> ::=
<br> <a href="#xref-CHARACTER"> CHARACTER </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-CHAR"> CHAR </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-CHARACTER"> CHARACTER </a> <a href="#xref-VARYING"> VARYING </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-CHAR"> CHAR </a> <a href="#xref-VARYING"> VARYING </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-VARCHAR"> VARCHAR </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-length" name="length"> <length> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-national character string type" name="national character string type"> <national character string type> </a> ::=
<br> <a href="#xref-NATIONAL"> NATIONAL </a> <a href="#xref-CHARACTER"> CHARACTER </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-NATIONAL"> NATIONAL </a> <a href="#xref-CHAR"> CHAR </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-NCHAR"> NCHAR </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-NATIONAL"> NATIONAL </a> <a href="#xref-CHARACTER"> CHARACTER </a> <a href="#xref-VARYING"> VARYING </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-NATIONAL"> NATIONAL </a> <a href="#xref-CHAR"> CHAR </a> <a href="#xref-VARYING"> VARYING </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-NCHAR"> NCHAR </a> <a href="#xref-VARYING"> VARYING </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-bit string type" name="bit string type"> <bit string type> </a> ::=
<br> <a href="#xref-BIT"> BIT </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-BIT"> BIT </a> <a href="#xref-VARYING"> VARYING </a> [ <a href='#left paren'><left paren></a> <a href='#length'><length></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-numeric type" name="numeric type"> <numeric type> </a> ::=
<br> <a href='#exact numeric type'><exact numeric type></a><br> | <a href='#approximate numeric type'><approximate numeric type></a>
<p><a href="#xref-exact numeric type" name="exact numeric type"> <exact numeric type> </a> ::=
<br> <a href="#xref-NUMERIC"> NUMERIC </a> [ <a href='#left paren'><left paren></a> <a href='#precision'><precision></a> [ <a href='#comma'><comma></a> <a href='#scale'><scale></a> ] <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-DECIMAL"> DECIMAL </a> [ <a href='#left paren'><left paren></a> <a href='#precision'><precision></a> [ <a href='#comma'><comma></a> <a href='#scale'><scale></a> ] <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-DEC"> DEC </a> [ <a href='#left paren'><left paren></a> <a href='#precision'><precision></a> [ <a href='#comma'><comma></a> <a href='#scale'><scale></a> ] <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-INTEGER"> INTEGER </a><br> | <a href="#xref-INT"> INT </a><br> | <a href="#xref-SMALLINT"> SMALLINT </a>
<p><a href="#xref-precision" name="precision"> <precision> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-scale" name="scale"> <scale> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-approximate numeric type" name="approximate numeric type"> <approximate numeric type> </a> ::=
<br> <a href="#xref-FLOAT"> FLOAT </a> [ <a href='#left paren'><left paren></a> <a href='#precision'><precision></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-REAL"> REAL </a><br> | <a href="#xref-DOUBLE"> DOUBLE </a> <a href="#xref-PRECISION"> PRECISION </a>
<p><a href="#xref-datetime type" name="datetime type"> <datetime type> </a> ::=
<br> <a href="#xref-DATE"> DATE </a><br> | <a href="#xref-TIME"> TIME </a> [ <a href='#left paren'><left paren></a> <a href='#time precision'><time precision></a> <a href='#right paren'><right paren></a> ] [ <a href="#xref-WITH"> WITH </a> <a href="#xref-TIME"> TIME </a> <a href="#xref-ZONE"> ZONE </a> ]<br> | <a href="#xref-TIMESTAMP"> TIMESTAMP </a> [ <a href='#left paren'><left paren></a> <a href='#timestamp precision'><timestamp precision></a> <a href='#right paren'><right paren></a> ] [ <a href="#xref-WITH"> WITH </a> <a href="#xref-TIME"> TIME </a> <a href="#xref-ZONE"> ZONE </a> ]
<p><a href="#xref-time precision" name="time precision"> <time precision> </a> ::= <a href='#time fractional seconds precision'><time fractional seconds precision></a>
<p><a href="#xref-time fractional seconds precision" name="time fractional seconds precision"> <time fractional seconds precision> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-timestamp precision" name="timestamp precision"> <timestamp precision> </a> ::= <a href='#time fractional seconds precision'><time fractional seconds precision></a>
<p><a href="#xref-interval type" name="interval type"> <interval type> </a> ::= <a href="#xref-INTERVAL"> INTERVAL </a> <a href='#interval qualifier'><interval qualifier></a>
<p><a href="#xref-interval qualifier" name="interval qualifier"> <interval qualifier> </a> ::=
<br> <a href='#start field'><start field></a> <a href="#xref-TO"> TO </a> <a href='#end field'><end field></a><br> | <a href='#single datetime field'><single datetime field></a>
<p><a href="#xref-start field" name="start field"> <start field> </a> ::=
<br> <a href='#non-second datetime field'><non-second datetime field></a> [ <a href='#left paren'><left paren></a> <a href='#interval leading field precision'><interval leading field precision></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-non-second datetime field" name="non-second datetime field"> <non-second datetime field> </a> ::= <a href="#xref-YEAR"> YEAR </a> | <a href="#xref-MONTH"> MONTH </a> | <a href="#xref-DAY"> DAY </a> | <a href="#xref-HOUR"> HOUR </a> | <a href="#xref-MINUTE"> MINUTE </a>
<p><a href="#xref-interval leading field precision" name="interval leading field precision"> <interval leading field precision> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-end field" name="end field"> <end field> </a> ::=
<br> <a href='#non-second datetime field'><non-second datetime field></a><br> | <a href="#xref-SECOND"> SECOND </a> [ <a href='#left paren'><left paren></a> <a href='#interval fractional seconds precision'><interval fractional seconds precision></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-interval fractional seconds precision" name="interval fractional seconds precision"> <interval fractional seconds precision> </a> ::= <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-single datetime field" name="single datetime field"> <single datetime field> </a> ::=
<br> <a href='#non-second datetime field'><non-second datetime field></a> [ <a href='#left paren'><left paren></a> <a href='#interval leading field precision'><interval leading field precision></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-SECOND"> SECOND </a> [ <a href='#left paren'><left paren></a> <a href='#interval leading field precision'><interval leading field precision></a> [ <a href='#comma'><comma></a> <a href='#left paren'><left paren></a> <a href='#interval fractional seconds precision'><interval fractional seconds precision></a> ] <a href='#right paren'><right paren></a> ]
<p><a href="#xref-domain name" name="domain name"> <domain name> </a> ::= <a href='#qualified name'><qualified name></a>
<p><a href="#xref-qualified name" name="qualified name"> <qualified name> </a> ::= [ <a href='#schema name'><schema name></a> <a href='#period'><period></a> ] <a href='#qualified identifier'><qualified identifier></a>
<p><a href="#xref-default clause" name="default clause"> <default clause> </a> ::= <a href="#xref-DEFAULT"> DEFAULT </a> <a href='#default option'><default option></a>
<p><a href="#xref-default option" name="default option"> <default option> </a> ::=
<br> <a href='#literal'><literal></a><br> | <a href='#datetime value function'><datetime value function></a><br> | <a href="#xref-USER"> USER </a><br> | <a href="#xref-CURRENT_USER"> CURRENT_USER </a><br> | <a href="#xref-SESSION_USER"> SESSION_USER </a><br> | <a href="#xref-SYSTEM_USER"> SYSTEM_USER </a><br> | <a href="#xref-NULL"> NULL </a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Literals
</h2>
<p><a href="#xref-literal" name="literal"> <literal> </a> ::= <a href='#signed numeric literal'><signed numeric literal></a> | <a href='#general literal'><general literal></a>
<p><a href="#xref-signed numeric literal" name="signed numeric literal"> <signed numeric literal> </a> ::= [ <a href='#sign'><sign></a> ] <a href='#unsigned numeric literal'><unsigned numeric literal></a>
<p><a href="#xref-general literal" name="general literal"> <general literal> </a> ::=
<br> <a href='#character string literal'><character string literal></a><br> | <a href='#national character string literal'><national character string literal></a><br> | <a href='#bit string literal'><bit string literal></a><br> | <a href='#hex string literal'><hex string literal></a><br> | <a href='#datetime literal'><datetime literal></a><br> | <a href='#interval literal'><interval literal></a>
<p><a href="#xref-datetime literal" name="datetime literal"> <datetime literal> </a> ::=
<br> <a href='#date literal'><date literal></a><br> | <a href='#time literal'><time literal></a><br> | <a href='#timestamp literal'><timestamp literal></a>
<p><a href="#xref-date literal" name="date literal"> <date literal> </a> ::= <a href="#xref-DATE"> DATE </a> <a href='#date string'><date string></a>
<p><a href="#xref-time literal" name="time literal"> <time literal> </a> ::= <a href="#xref-TIME"> TIME </a> <a href='#time string'><time string></a>
<p><a href="#xref-timestamp literal" name="timestamp literal"> <timestamp literal> </a> ::= <a href="#xref-TIMESTAMP"> TIMESTAMP </a> <a href='#timestamp string'><timestamp string></a>
<p><a href="#xref-interval literal" name="interval literal"> <interval literal> </a> ::= <a href="#xref-INTERVAL"> INTERVAL </a> [ <a href='#sign'><sign></a> ] <a href='#interval string'><interval string></a> <a href='#interval qualifier'><interval qualifier></a>
<p><a href="#xref-datetime value function" name="datetime value function"> <datetime value function> </a> ::=
<br> <a href='#current date value function'><current date value function></a><br> | <a href='#current time value function'><current time value function></a><br> | <a href='#current timestamp value function'><current timestamp value function></a>
<p><a href="#xref-current date value function" name="current date value function"> <current date value function> </a> ::= <a href="#xref-CURRENT_DATE"> CURRENT_DATE </a>
<p><a href="#xref-current time value function" name="current time value function"> <current time value function> </a> ::= <a href="#xref-CURRENT_TIME"> CURRENT_TIME </a> [ <a href='#left paren'><left paren></a> <a href='#time precision'><time precision></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-current timestamp value function" name="current timestamp value function"> <current timestamp value function> </a> ::= <a href="#xref-CURRENT_TIMESTAMP"> CURRENT_TIMESTAMP </a> [ <a href='#left paren'><left paren></a> <a href='#timestamp precision'><timestamp precision></a> <a href='#right paren'><right paren></a> ]
<p><a href='#top'>Top</a></p>
<hr>
<h2> Constraints
</h2>
<p><a href="#xref-column constraint definition" name="column constraint definition"> <column constraint definition> </a> ::=
<br> [ <a href='#constraint name definition'><constraint name definition></a> ] <a href='#column constraint'><column constraint></a> [ <a href='#constraint attributes'><constraint attributes></a> ]
<p><a href="#xref-constraint name definition" name="constraint name definition"> <constraint name definition> </a> ::= <a href="#xref-CONSTRAINT"> CONSTRAINT </a> <a href='#constraint name'><constraint name></a>
<p><a href="#xref-constraint name" name="constraint name"> <constraint name> </a> ::= <a href='#qualified name'><qualified name></a>
<p><a href="#xref-column constraint" name="column constraint"> <column constraint> </a> ::=
<br> <a href="#xref-NOT"> NOT </a> <a href="#xref-NULL"> NULL </a><br> | <a href='#unique specification'><unique specification></a><br> | <a href='#references specification'><references specification></a><br> | <a href='#check constraint definition'><check constraint definition></a>
<p><a href="#xref-unique specification" name="unique specification"> <unique specification> </a> ::= <a href="#xref-UNIQUE"> UNIQUE </a> | <a href="#xref-PRIMARY"> PRIMARY </a> <a href="#xref-KEY"> KEY </a>
<p><a href="#xref-references specification" name="references specification"> <references specification> </a> ::=
<br> <a href="#xref-REFERENCES"> REFERENCES </a> <a href='#referenced table and columns'><referenced table and columns></a> [ <a href="#xref-MATCH"> MATCH </a> <a href='#match type'><match type></a> ] [ <a href='#referential triggered action'><referential triggered action></a> ]
<p><a href="#xref-referenced table and columns" name="referenced table and columns"> <referenced table and columns> </a> ::= <a href='#table name'><table name></a> [ <a href='#left paren'><left paren></a> <a href='#reference column list'><reference column list></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-table name" name="table name"> <table name> </a> ::= <a href='#qualified name'><qualified name></a> | <a href='#qualified local table name'><qualified local table name></a>
<p><a href="#xref-reference column list" name="reference column list"> <reference column list> </a> ::= <a href='#column name list'><column name list></a>
<p><a href="#xref-column name list" name="column name list"> <column name list> </a> ::= <a href='#column name'><column name></a> [ { <a href='#comma'><comma></a> <a href='#column name'><column name></a> }... ]
<p><a href="#xref-match type" name="match type"> <match type> </a> ::= <a href="#xref-FULL"> FULL </a> | <a href="#xref-PARTIAL"> PARTIAL </a>
<p><a href="#xref-referential triggered action" name="referential triggered action"> <referential triggered action> </a> ::=
<br> <a href='#update rule'><update rule></a> [ <a href='#delete rule'><delete rule></a> ]<br> | <a href='#delete rule'><delete rule></a> [ <a href='#update rule'><update rule></a> ]
<p><a href="#xref-update rule" name="update rule"> <update rule> </a> ::= <a href="#xref-ON"> ON </a> <a href="#xref-UPDATE"> UPDATE </a> <a href='#referential action'><referential action></a>
<p><a href="#xref-referential action" name="referential action"> <referential action> </a> ::= <a href="#xref-CASCADE"> CASCADE </a> | <a href="#xref-SET"> SET </a> <a href="#xref-NULL"> NULL </a> | <a href="#xref-SET"> SET </a> <a href="#xref-DEFAULT"> DEFAULT </a> | <a href="#xref-NO"> NO </a> <a href="#xref-ACTION"> ACTION </a>
<p><a href="#xref-delete rule" name="delete rule"> <delete rule> </a> ::= <a href="#xref-ON"> ON </a> <a href="#xref-DELETE"> DELETE </a> <a href='#referential action'><referential action></a>
<p><a href="#xref-check constraint definition" name="check constraint definition"> <check constraint definition> </a> ::= <a href="#xref-CHECK"> CHECK </a> <a href='#left paren'><left paren></a> <a href='#search condition'><search condition></a> <a href='#right paren'><right paren></a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Search Condition
</h2>
<p><a href="#xref-search condition" name="search condition"> <search condition> </a> ::=
<br> <a href='#boolean term'><boolean term></a><br> | <a href='#search condition'><search condition></a> <a href="#xref-OR"> OR </a> <a href='#boolean term'><boolean term></a>
<p><a href="#xref-boolean term" name="boolean term"> <boolean term> </a> ::=
<br> <a href='#boolean factor'><boolean factor></a><br> | <a href='#boolean term'><boolean term></a> <a href="#xref-AND"> AND </a> <a href='#boolean factor'><boolean factor></a>
<p><a href="#xref-boolean factor" name="boolean factor"> <boolean factor> </a> ::= [ <a href="#xref-NOT"> NOT </a> ] <a href='#boolean test'><boolean test></a>
<p><a href="#xref-boolean test" name="boolean test"> <boolean test> </a> ::= <a href='#boolean primary'><boolean primary></a> [ <a href="#xref-IS"> IS </a> [ <a href="#xref-NOT"> NOT </a> ] <a href='#truth value'><truth value></a> ]
<p><a href="#xref-boolean primary" name="boolean primary"> <boolean primary> </a> ::= <a href='#predicate'><predicate></a> | <a href='#left paren'><left paren></a> <a href='#search condition'><search condition></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-predicate" name="predicate"> <predicate> </a> ::=
<br> <a href='#comparison predicate'><comparison predicate></a><br> | <a href='#between predicate'><between predicate></a><br> | <a href='#in predicate'><in predicate></a><br> | <a href='#like predicate'><like predicate></a><br> | <a href='#null predicate'><null predicate></a><br> | <a href='#quantified comparison predicate'><quantified comparison predicate></a><br> | <a href='#exists predicate'><exists predicate></a><br> | <a href='#match predicate'><match predicate></a><br> | <a href='#overlaps predicate'><overlaps predicate></a>
<p><a href="#xref-comparison predicate" name="comparison predicate"> <comparison predicate> </a> ::= <a href='#row value constructor'><row value constructor></a> <a href='#comp op'><comp op></a> <a href='#row value constructor'><row value constructor></a>
<p><a href="#xref-row value constructor" name="row value constructor"> <row value constructor> </a> ::=
<br> <a href='#row value constructor element'><row value constructor element></a><br> | <a href='#left paren'><left paren></a> <a href='#row value constructor list'><row value constructor list></a> <a href='#right paren'><right paren></a><br> | <a href='#row subquery'><row subquery></a>
<p><a href="#xref-row value constructor element" name="row value constructor element"> <row value constructor element> </a> ::=
<br> <a href='#value expression'><value expression></a><br> | <a href='#null specification'><null specification></a><br> | <a href='#default specification'><default specification></a>
<p><a href="#xref-value expression" name="value expression"> <value expression> </a> ::=
<br> <a href='#numeric value expression'><numeric value expression></a><br> | <a href='#string value expression'><string value expression></a><br> | <a href='#datetime value expression'><datetime value expression></a><br> | <a href='#interval value expression'><interval value expression></a>
<p><a href="#xref-numeric value expression" name="numeric value expression"> <numeric value expression> </a> ::=
<br> <a href='#term'><term></a><br> | <a href='#numeric value expression'><numeric value expression></a> <a href='#plus sign'><plus sign></a> <a href='#term'><term></a><br> | <a href='#numeric value expression'><numeric value expression></a> <a href='#minus sign'><minus sign></a> <a href='#term'><term></a>
<p><a href="#xref-term" name="term"> <term> </a> ::=
<br> <a href='#factor'><factor></a><br> | <a href='#term'><term></a> <a href='#asterisk'><asterisk></a> <a href='#factor'><factor></a><br> | <a href='#term'><term></a> <a href='#solidus'><solidus></a> <a href='#factor'><factor></a>
<p><a href="#xref-factor" name="factor"> <factor> </a> ::= [ <a href='#sign'><sign></a> ] <a href='#numeric primary'><numeric primary></a>
<p><a href="#xref-numeric primary" name="numeric primary"> <numeric primary> </a> ::= <a href='#value expression primary'><value expression primary></a> | <a href='#numeric value function'><numeric value function></a>
<p><a href="#xref-value expression primary" name="value expression primary"> <value expression primary> </a> ::=
<br> <a href='#unsigned value specification'><unsigned value specification></a><br> | <a href='#column reference'><column reference></a><br> | <a href='#set function specification'><set function specification></a><br> | <a href='#scalar subquery'><scalar subquery></a><br> | <a href='#case expression'><case expression></a><br> | <a href='#left paren'><left paren></a> <a href='#value expression'><value expression></a> <a href='#right paren'><right paren></a><br> | <a href='#cast specification'><cast specification></a>
<p><a href="#xref-unsigned value specification" name="unsigned value specification"> <unsigned value specification> </a> ::= <a href='#unsigned literal'><unsigned literal></a> | <a href='#general value specification'><general value specification></a>
<p><a href="#xref-unsigned literal" name="unsigned literal"> <unsigned literal> </a> ::= <a href='#unsigned numeric literal'><unsigned numeric literal></a> | <a href='#general literal'><general literal></a>
<p><a href="#xref-general value specification" name="general value specification"> <general value specification> </a> ::=
<br> <a href='#parameter specification'><parameter specification></a><br> | <a href='#dynamic parameter specification'><dynamic parameter specification></a><br> | <a href='#variable specification'><variable specification></a><br> | <a href="#xref-USER"> USER </a><br> | <a href="#xref-CURRENT_USER"> CURRENT_USER </a><br> | <a href="#xref-SESSION_USER"> SESSION_USER </a><br> | <a href="#xref-SYSTEM_USER"> SYSTEM_USER </a><br> | <a href="#xref-VALUE"> VALUE </a>
<p><a href="#xref-parameter specification" name="parameter specification"> <parameter specification> </a> ::= <a href='#parameter name'><parameter name></a> [ <a href='#indicator parameter'><indicator parameter></a> ]
<p><a href="#xref-parameter name" name="parameter name"> <parameter name> </a> ::= <a href='#colon'><colon></a> <a href='#identifier'><identifier></a>
<p><a href="#xref-indicator parameter" name="indicator parameter"> <indicator parameter> </a> ::= [ <a href="#xref-INDICATOR"> INDICATOR </a> ] <a href='#parameter name'><parameter name></a>
<p><a href="#xref-dynamic parameter specification" name="dynamic parameter specification"> <dynamic parameter specification> </a> ::= <a href='#question mark'><question mark></a>
<p><a href="#xref-variable specification" name="variable specification"> <variable specification> </a> ::= <a href='#embedded variable name'><embedded variable name></a> [ <a href='#indicator variable'><indicator variable></a> ]
<p><a href="#xref-embedded variable name" name="embedded variable name"> <embedded variable name> </a> ::= <a href='#colon'><colon></a> <a href='#host identifier'><host identifier></a>
<p><a href="#xref-host identifier" name="host identifier"> <host identifier> </a> ::=
<br> <a href='#Ada host identifier'><Ada host identifier></a><br> | <a href='#C host identifier'><C host identifier></a><br> | <a href='#Cobol host identifier'><Cobol host identifier></a><br> | <a href='#Fortran host identifier'><Fortran host identifier></a><br> | <a href='#MUMPS host identifier'><MUMPS host identifier></a><br> | <a href='#Pascal host identifier'><Pascal host identifier></a><br> | <a href='#PL/I host identifier'><PL/I host identifier></a>
<p><a href="#xref-Ada host identifier" name="Ada host identifier"> <Ada host identifier> </a> ::= <font color="red"> !! See syntax rules </font>
<p><a href="#xref-C host identifier" name="C host identifier"> <C host identifier> </a> ::= <font color="red"> !! See syntax rules </font>
<p><a href="#xref-Cobol host identifier" name="Cobol host identifier"> <Cobol host identifier> </a> ::= <font color="red"> !! See syntax rules </font>
<p><a href="#xref-Fortran host identifier" name="Fortran host identifier"> <Fortran host identifier> </a> ::= <font color="red"> !! See syntax rules </font>
<p><a href="#xref-MUMPS host identifier" name="MUMPS host identifier"> <MUMPS host identifier> </a> ::= <font color="red"> !! See syntax rules </font>
<p><a href="#xref-Pascal host identifier" name="Pascal host identifier"> <Pascal host identifier> </a> ::= <font color="red"> !! See syntax rules </font>
<p><a href="#xref-PL/I host identifier" name="PL/I host identifier"> <PL/I host identifier> </a> ::= <font color="red"> !! See syntax rules </font>
<p><a href="#xref-indicator variable" name="indicator variable"> <indicator variable> </a> ::= [ <a href="#xref-INDICATOR"> INDICATOR </a> ] <a href='#embedded variable name'><embedded variable name></a>
<p><a href="#xref-column reference" name="column reference"> <column reference> </a> ::= [ <a href='#qualifier'><qualifier></a> <a href='#period'><period></a> ] <a href='#column name'><column name></a>
<p><a href="#xref-qualifier" name="qualifier"> <qualifier> </a> ::= <a href='#table name'><table name></a> | <a href='#correlation name'><correlation name></a>
<p><a href="#xref-correlation name" name="correlation name"> <correlation name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-set function specification" name="set function specification"> <set function specification> </a> ::=
<br> <a href="#xref-COUNT"> COUNT </a> <a href='#left paren'><left paren></a> <a href='#asterisk'><asterisk></a> <a href='#right paren'><right paren></a><br> | <a href='#general set function'><general set function></a>
<p><a href="#xref-general set function" name="general set function"> <general set function> </a> ::=
<br> <a href='#set function type'><set function type></a> <a href='#left paren'><left paren></a> [ <a href='#set quantifier'><set quantifier></a> ] <a href='#value expression'><value expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-set function type" name="set function type"> <set function type> </a> ::= <a href="#xref-AVG"> AVG </a> | <a href="#xref-MAX"> MAX </a> | <a href="#xref-MIN"> MIN </a> | <a href="#xref-SUM"> SUM </a> | <a href="#xref-COUNT"> COUNT </a>
<p><a href="#xref-set quantifier" name="set quantifier"> <set quantifier> </a> ::= <a href="#xref-DISTINCT"> DISTINCT </a> | <a href="#xref-ALL"> ALL </a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Queries
</h2>
<p><a href="#xref-scalar subquery" name="scalar subquery"> <scalar subquery> </a> ::= <a href='#subquery'><subquery></a>
<p><a href="#xref-subquery" name="subquery"> <subquery> </a> ::= <a href='#left paren'><left paren></a> <a href='#query expression'><query expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-query expression" name="query expression"> <query expression> </a> ::= <a href='#non-join query expression'><non-join query expression></a> | <a href='#joined table'><joined table></a>
<p><a href="#xref-non-join query expression" name="non-join query expression"> <non-join query expression> </a> ::=
<br> <a href='#non-join query term'><non-join query term></a><br> | <a href='#query expression'><query expression></a> <a href="#xref-UNION"> UNION </a> [ <a href="#xref-ALL"> ALL </a> ] [ <a href='#corresponding spec'><corresponding spec></a> ] <a href='#query term'><query term></a><br> | <a href='#query expression'><query expression></a> <a href="#xref-EXCEPT"> EXCEPT </a> [ <a href="#xref-ALL"> ALL </a> ] [ <a href='#corresponding spec'><corresponding spec></a> ] <a href='#query term'><query term></a>
<p><a href="#xref-non-join query term" name="non-join query term"> <non-join query term> </a> ::=
<br> <a href='#non-join query primary'><non-join query primary></a><br> | <a href='#query term'><query term></a> <a href="#xref-INTERSECT"> INTERSECT </a> [ <a href="#xref-ALL"> ALL </a> ] [ <a href='#corresponding spec'><corresponding spec></a> ] <a href='#query primary'><query primary></a>
<p><a href="#xref-non-join query primary" name="non-join query primary"> <non-join query primary> </a> ::= <a href='#simple table'><simple table></a> | <a href='#left paren'><left paren></a> <a href='#non-join query expression'><non-join query expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-simple table" name="simple table"> <simple table> </a> ::=
<br> <a href='#query specification'><query specification></a><br> | <a href='#table value constructor'><table value constructor></a><br> | <a href='#explicit table'><explicit table></a>
<p><a href="#xref-query specification" name="query specification"> <query specification> </a> ::=
<br> <a href="#xref-SELECT"> SELECT </a> [ <a href='#set quantifier'><set quantifier></a> ] <a href='#select list'><select list></a> <a href='#table expression'><table expression></a>
<p><a href="#xref-select list" name="select list"> <select list> </a> ::=
<br> <a href='#asterisk'><asterisk></a><br> | <a href='#select sublist'><select sublist></a> [ { <a href='#comma'><comma></a> <a href='#select sublist'><select sublist></a> }... ]
<p><a href="#xref-select sublist" name="select sublist"> <select sublist> </a> ::= <a href='#derived column'><derived column></a> | <a href='#qualifier'><qualifier></a> <a href='#period'><period></a> <a href='#asterisk'><asterisk></a>
<p><a href="#xref-derived column" name="derived column"> <derived column> </a> ::= <a href='#value expression'><value expression></a> [ <a href='#as clause'><as clause></a> ]
<p><a href="#xref-as clause" name="as clause"> <as clause> </a> ::= [ <a href="#xref-AS"> AS </a> ] <a href='#column name'><column name></a>
<p><a href="#xref-table expression" name="table expression"> <table expression> </a> ::=
<br> <a href='#from clause'><from clause></a><br> [ <a href='#where clause'><where clause></a> ]<br> [ <a href='#group by clause'><group by clause></a> ]<br> [ <a href='#having clause'><having clause></a> ]
<p><a href="#xref-from clause" name="from clause"> <from clause> </a> ::= <a href="#xref-FROM"> FROM </a> <a href='#table reference'><table reference></a> [ { <a href='#comma'><comma></a> <a href='#table reference'><table reference></a> }... ]
<small>
<i>
Note that <correlation specification> does not appear in the ISO/IEC grammar.
The notation is written out longhand several times, instead.
</i>
</small>
<p><a href="#xref-table reference" name="table reference"> <table reference> </a> ::=
<br> <a href='#table name'><table name></a> [ <a href='#correlation specification'><correlation specification></a> ]<br> | <a href='#derived table'><derived table></a> <a href='#correlation specification'><correlation specification></a><br> | <a href='#joined table'><joined table></a>
<p><a href="#xref-correlation specification" name="correlation specification"> <correlation specification> </a> ::=
<br> [ <a href="#xref-AS"> AS </a> ] <a href='#correlation name'><correlation name></a> [ <a href='#left paren'><left paren></a> <a href='#derived column list'><derived column list></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-derived column list" name="derived column list"> <derived column list> </a> ::= <a href='#column name list'><column name list></a>
<p><a href="#xref-derived table" name="derived table"> <derived table> </a> ::= <a href='#table subquery'><table subquery></a>
<p><a href="#xref-table subquery" name="table subquery"> <table subquery> </a> ::= <a href='#subquery'><subquery></a>
<p><a href="#xref-joined table" name="joined table"> <joined table> </a> ::=
<br> <a href='#cross join'><cross join></a><br> | <a href='#qualified join'><qualified join></a><br> | <a href='#left paren'><left paren></a> <a href='#joined table'><joined table></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-cross join" name="cross join"> <cross join> </a> ::=
<br> <a href='#table reference'><table reference></a> <a href="#xref-CROSS"> CROSS </a> <a href="#xref-JOIN"> JOIN </a> <a href='#table reference'><table reference></a>
<p><a href="#xref-qualified join" name="qualified join"> <qualified join> </a> ::=
<br> <a href='#table reference'><table reference></a> [ <a href="#xref-NATURAL"> NATURAL </a> ] [ <a href='#join type'><join type></a> ] <a href="#xref-JOIN"> JOIN </a> <a href='#table reference'><table reference></a> [ <a href='#join specification'><join specification></a> ]
<p><a href="#xref-join type" name="join type"> <join type> </a> ::=
<br> <a href="#xref-INNER"> INNER </a><br> | <a href='#outer join type'><outer join type></a> [ <a href="#xref-OUTER"> OUTER </a> ]<br> | <a href="#xref-UNION"> UNION </a>
<p><a href="#xref-outer join type" name="outer join type"> <outer join type> </a> ::= <a href="#xref-LEFT"> LEFT </a> | <a href="#xref-RIGHT"> RIGHT </a> | <a href="#xref-FULL"> FULL </a>
<p><a href="#xref-join specification" name="join specification"> <join specification> </a> ::= <a href='#join condition'><join condition></a> | <a href='#named columns join'><named columns join></a>
<p><a href="#xref-join condition" name="join condition"> <join condition> </a> ::= <a href="#xref-ON"> ON </a> <a href='#search condition'><search condition></a>
<p><a href="#xref-named columns join" name="named columns join"> <named columns join> </a> ::= <a href="#xref-USING"> USING </a> <a href='#left paren'><left paren></a> <a href='#join column list'><join column list></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-join column list" name="join column list"> <join column list> </a> ::= <a href='#column name list'><column name list></a>
<p><a href="#xref-where clause" name="where clause"> <where clause> </a> ::= <a href="#xref-WHERE"> WHERE </a> <a href='#search condition'><search condition></a>
<p><a href="#xref-group by clause" name="group by clause"> <group by clause> </a> ::= <a href="#xref-GROUP"> GROUP </a> <a href="#xref-BY"> BY </a> <a href='#grouping column reference list'><grouping column reference list></a>
<p><a href="#xref-grouping column reference list" name="grouping column reference list"> <grouping column reference list> </a> ::=
<br> <a href='#grouping column reference'><grouping column reference></a> [ { <a href='#comma'><comma></a> <a href='#grouping column reference'><grouping column reference></a> }... ]
<p><a href="#xref-grouping column reference" name="grouping column reference"> <grouping column reference> </a> ::= <a href='#column reference'><column reference></a> [ <a href='#collate clause'><collate clause></a> ]
<p><a href="#xref-collate clause" name="collate clause"> <collate clause> </a> ::= <a href="#xref-COLLATE"> COLLATE </a> <a href='#collation name'><collation name></a>
<p><a href="#xref-collation name" name="collation name"> <collation name> </a> ::= <a href='#qualified name'><qualified name></a>
<p><a href="#xref-having clause" name="having clause"> <having clause> </a> ::= <a href="#xref-HAVING"> HAVING </a> <a href='#search condition'><search condition></a>
<p><a href="#xref-table value constructor" name="table value constructor"> <table value constructor> </a> ::= <a href="#xref-VALUES"> VALUES </a> <a href='#table value constructor list'><table value constructor list></a>
<p><a href="#xref-table value constructor list" name="table value constructor list"> <table value constructor list> </a> ::= <a href='#row value constructor'><row value constructor></a> [ { <a href='#comma'><comma></a> <a href='#row value constructor'><row value constructor></a> }... ]
<p><a href="#xref-explicit table" name="explicit table"> <explicit table> </a> ::= <a href="#xref-TABLE"> TABLE </a> <a href='#table name'><table name></a>
<p><a href="#xref-query term" name="query term"> <query term> </a> ::= <a href='#non-join query term'><non-join query term></a> | <a href='#joined table'><joined table></a>
<p><a href="#xref-corresponding spec" name="corresponding spec"> <corresponding spec> </a> ::= <a href="#xref-CORRESPONDING"> CORRESPONDING </a> [ <a href="#xref-BY"> BY </a> <a href='#left paren'><left paren></a> <a href='#corresponding column list'><corresponding column list></a> <a href='#right paren'><right paren></a> ]
<p><a href="#xref-corresponding column list" name="corresponding column list"> <corresponding column list> </a> ::= <a href='#column name list'><column name list></a>
<p><a href="#xref-query primary" name="query primary"> <query primary> </a> ::= <a href='#non-join query primary'><non-join query primary></a> | <a href='#joined table'><joined table></a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Query expression components
</h2>
<p><a href="#xref-case expression" name="case expression"> <case expression> </a> ::= <a href='#case abbreviation'><case abbreviation></a> | <a href='#case specification'><case specification></a>
<p><a href="#xref-case abbreviation" name="case abbreviation"> <case abbreviation> </a> ::=
<br> <a href="#xref-NULLIF"> NULLIF </a> <a href='#left paren'><left paren></a> <a href='#value expression'><value expression></a> <a href='#comma'><comma></a> <a href='#value expression'><value expression></a> <a href='#right paren'><right paren></a><br> | <a href="#xref-COALESCE"> COALESCE </a> <a href='#left paren'><left paren></a> <a href='#value expression'><value expression></a> { <a href='#comma'><comma></a> <a href='#value expression'><value expression></a> }... <a href='#right paren'><right paren></a>
<p><a href="#xref-case specification" name="case specification"> <case specification> </a> ::= <a href='#simple case'><simple case></a> | <a href='#searched case'><searched case></a>
<p><a href="#xref-simple case" name="simple case"> <simple case> </a> ::=
<br> <a href="#xref-CASE"> CASE </a> <a href='#case operand'><case operand></a><br> <a href='#simple when clause'><simple when clause></a> ...<br> [ <a href='#else clause'><else clause></a> ]<br> <a href="#xref-END"> END </a>
<p><a href="#xref-case operand" name="case operand"> <case operand> </a> ::= <a href='#value expression'><value expression></a>
<p><a href="#xref-simple when clause" name="simple when clause"> <simple when clause> </a> ::= <a href="#xref-WHEN"> WHEN </a> <a href='#when operand'><when operand></a> <a href="#xref-THEN"> THEN </a> <a href='#result'><result></a>
<p><a href="#xref-when operand" name="when operand"> <when operand> </a> ::= <a href='#value expression'><value expression></a>
<p><a href="#xref-result" name="result"> <result> </a> ::= <a href='#result expression'><result expression></a> | <a href="#xref-NULL"> NULL </a>
<p><a href="#xref-result expression" name="result expression"> <result expression> </a> ::= <a href='#value expression'><value expression></a>
<p><a href="#xref-else clause" name="else clause"> <else clause> </a> ::= <a href="#xref-ELSE"> ELSE </a> <a href='#result'><result></a>
<p><a href="#xref-searched case" name="searched case"> <searched case> </a> ::=
<br> <a href="#xref-CASE"> CASE </a><br> <a href='#searched when clause'><searched when clause></a> ...<br> [ <a href='#else clause'><else clause></a> ]<br> <a href="#xref-END"> END </a>
<p><a href="#xref-searched when clause" name="searched when clause"> <searched when clause> </a> ::= <a href="#xref-WHEN"> WHEN </a> <a href='#search condition'><search condition></a> <a href="#xref-THEN"> THEN </a> <a href='#result'><result></a>
<p><a href="#xref-cast specification" name="cast specification"> <cast specification> </a> ::= <a href="#xref-CAST"> CAST </a> <a href='#left paren'><left paren></a> <a href='#cast operand'><cast operand></a> <a href="#xref-AS"> AS </a> <a href='#cast target'><cast target></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-cast operand" name="cast operand"> <cast operand> </a> ::= <a href='#value expression'><value expression></a> | <a href="#xref-NULL"> NULL </a>
<p><a href="#xref-cast target" name="cast target"> <cast target> </a> ::= <a href='#domain name'><domain name></a> | <a href='#data type'><data type></a>
<p><a href="#xref-numeric value function" name="numeric value function"> <numeric value function> </a> ::= <a href='#position expression'><position expression></a> | <a href='#extract expression'><extract expression></a> | <a href='#length expression'><length expression></a>
<p><a href="#xref-position expression" name="position expression"> <position expression> </a> ::=
<br> <a href="#xref-POSITION"> POSITION </a> <a href='#left paren'><left paren></a> <a href='#character value expression'><character value expression></a> <a href="#xref-IN"> IN </a> <a href='#character value expression'><character value expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-character value expression" name="character value expression"> <character value expression> </a> ::= <a href='#concatenation'><concatenation></a> | <a href='#character factor'><character factor></a>
<p><a href="#xref-concatenation" name="concatenation"> <concatenation> </a> ::= <a href='#character value expression'><character value expression></a> <a href='#concatenation operator'><concatenation operator></a> <a href='#character factor'><character factor></a>
<p><a href="#xref-character factor" name="character factor"> <character factor> </a> ::= <a href='#character primary'><character primary></a> [ <a href='#collate clause'><collate clause></a> ]
<p><a href="#xref-character primary" name="character primary"> <character primary> </a> ::= <a href='#value expression primary'><value expression primary></a> | <a href='#string value function'><string value function></a>
<p><a href="#xref-string value function" name="string value function"> <string value function> </a> ::= <a href='#character value function'><character value function></a> | <a href='#bit value function'><bit value function></a>
<p><a href="#xref-character value function" name="character value function"> <character value function> </a> ::=
<br> <a href='#character substring function'><character substring function></a><br> | <a href='#fold'><fold></a><br> | <a href='#form-of-use conversion'><form-of-use conversion></a><br> | <a href='#character translation'><character translation></a><br> | <a href='#trim function'><trim function></a>
<p><a href="#xref-character substring function" name="character substring function"> <character substring function> </a> ::=
<br> <a href="#xref-SUBSTRING"> SUBSTRING </a> <a href='#left paren'><left paren></a> <a href='#character value expression'><character value expression></a> <a href="#xref-FROM"> FROM </a> <a href='#start position'><start position></a> [ <a href="#xref-FOR"> FOR </a> <a href='#string length'><string length></a> ] <a href='#right paren'><right paren></a>
<p><a href="#xref-start position" name="start position"> <start position> </a> ::= <a href='#numeric value expression'><numeric value expression></a>
<p><a href="#xref-string length" name="string length"> <string length> </a> ::= <a href='#numeric value expression'><numeric value expression></a>
<p><a href="#xref-fold" name="fold"> <fold> </a> ::= { <a href="#xref-UPPER"> UPPER </a> | <a href="#xref-LOWER"> LOWER </a> } <a href='#left paren'><left paren></a> <a href='#character value expression'><character value expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-form-of-use conversion" name="form-of-use conversion"> <form-of-use conversion> </a> ::=
<br> <a href="#xref-CONVERT"> CONVERT </a> <a href='#left paren'><left paren></a> <a href='#character value expression'><character value expression></a> <a href="#xref-USING"> USING </a> <a href='#form-of-use conversion name'><form-of-use conversion name></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-form-of-use conversion name" name="form-of-use conversion name"> <form-of-use conversion name> </a> ::= <a href='#qualified name'><qualified name></a>
<p><a href="#xref-character translation" name="character translation"> <character translation> </a> ::=
<br> <a href="#xref-TRANSLATE"> TRANSLATE </a> <a href='#left paren'><left paren></a> <a href='#character value expression'><character value expression></a> <a href="#xref-USING"> USING </a> <a href='#translation name'><translation name></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-translation name" name="translation name"> <translation name> </a> ::= <a href='#qualified name'><qualified name></a>
<p><a href="#xref-trim function" name="trim function"> <trim function> </a> ::= <a href="#xref-TRIM"> TRIM </a> <a href='#left paren'><left paren></a> <a href='#trim operands'><trim operands></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-trim operands" name="trim operands"> <trim operands> </a> ::= [ [ <a href='#trim specification'><trim specification></a> ] [ <a href='#trim character'><trim character></a> ] <a href="#xref-FROM"> FROM </a> ] <a href='#trim source'><trim source></a>
<p><a href="#xref-trim specification" name="trim specification"> <trim specification> </a> ::= <a href="#xref-LEADING"> LEADING </a> | <a href="#xref-TRAILING"> TRAILING </a> | <a href="#xref-BOTH"> BOTH </a>
<p><a href="#xref-trim character" name="trim character"> <trim character> </a> ::= <a href='#character value expression'><character value expression></a>
<p><a href="#xref-trim source" name="trim source"> <trim source> </a> ::= <a href='#character value expression'><character value expression></a>
<p><a href="#xref-bit value function" name="bit value function"> <bit value function> </a> ::= <a href='#bit substring function'><bit substring function></a>
<p><a href="#xref-bit substring function" name="bit substring function"> <bit substring function> </a> ::=
<br> <a href="#xref-SUBSTRING"> SUBSTRING </a> <a href='#left paren'><left paren></a> <a href='#bit value expression'><bit value expression></a> <a href="#xref-FROM"> FROM </a> <a href='#start position'><start position></a> [ <a href="#xref-FOR"> FOR </a> <a href='#string length'><string length></a> ] <a href='#right paren'><right paren></a>
<p><a href="#xref-bit value expression" name="bit value expression"> <bit value expression> </a> ::= <a href='#bit concatenation'><bit concatenation></a> | <a href='#bit factor'><bit factor></a>
<p><a href="#xref-bit concatenation" name="bit concatenation"> <bit concatenation> </a> ::= <a href='#bit value expression'><bit value expression></a> <a href='#concatenation operator'><concatenation operator></a> <a href='#bit factor'><bit factor></a>
<p><a href="#xref-bit factor" name="bit factor"> <bit factor> </a> ::= <a href='#bit primary'><bit primary></a>
<p><a href="#xref-bit primary" name="bit primary"> <bit primary> </a> ::= <a href='#value expression primary'><value expression primary></a> | <a href='#string value function'><string value function></a>
<p><a href="#xref-extract expression" name="extract expression"> <extract expression> </a> ::= <a href="#xref-EXTRACT"> EXTRACT </a> <a href='#left paren'><left paren></a> <a href='#extract field'><extract field></a> <a href="#xref-FROM"> FROM </a> <a href='#extract source'><extract source></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-extract field" name="extract field"> <extract field> </a> ::= <a href='#datetime field'><datetime field></a> | <a href='#time zone field'><time zone field></a>
<p><a href="#xref-datetime field" name="datetime field"> <datetime field> </a> ::= <a href='#non-second datetime field'><non-second datetime field></a> | <a href="#xref-SECOND"> SECOND </a>
<p><a href="#xref-time zone field" name="time zone field"> <time zone field> </a> ::= <a href="#xref-TIMEZONE_HOUR"> TIMEZONE_HOUR </a> | <a href="#xref-TIMEZONE_MINUTE"> TIMEZONE_MINUTE </a>
<p><a href="#xref-extract source" name="extract source"> <extract source> </a> ::= <a href='#datetime value expression'><datetime value expression></a> | <a href='#interval value expression'><interval value expression></a>
<p><a href="#xref-datetime value expression" name="datetime value expression"> <datetime value expression> </a> ::=
<br> <a href='#datetime term'><datetime term></a><br> | <a href='#interval value expression'><interval value expression></a> <a href='#plus sign'><plus sign></a> <a href='#datetime term'><datetime term></a><br> | <a href='#datetime value expression'><datetime value expression></a> <a href='#plus sign'><plus sign></a> <a href='#interval term'><interval term></a><br> | <a href='#datetime value expression'><datetime value expression></a> <a href='#minus sign'><minus sign></a> <a href='#interval term'><interval term></a>
<p><a href="#xref-interval term" name="interval term"> <interval term> </a> ::=
<br> <a href='#interval factor'><interval factor></a><br> | <a href='#interval term 2'><interval term 2></a> <a href='#asterisk'><asterisk></a> <a href='#factor'><factor></a><br> | <a href='#interval term 2'><interval term 2></a> <a href='#solidus'><solidus></a> <a href='#factor'><factor></a><br> | <a href='#term'><term></a> <a href='#asterisk'><asterisk></a> <a href='#interval factor'><interval factor></a>
<p><a href="#xref-interval factor" name="interval factor"> <interval factor> </a> ::= [ <a href='#sign'><sign></a> ] <a href='#interval primary'><interval primary></a>
<p><a href="#xref-interval primary" name="interval primary"> <interval primary> </a> ::= <a href='#value expression primary'><value expression primary></a> [ <a href='#interval qualifier'><interval qualifier></a> ]
<p><a href="#xref-interval term 2" name="interval term 2"> <interval term 2> </a> ::= <a href='#interval term'><interval term></a>
<p><a href="#xref-interval value expression" name="interval value expression"> <interval value expression> </a> ::=
<br> <a href='#interval term'><interval term></a><br> | <a href='#interval value expression 1'><interval value expression 1></a> <a href='#plus sign'><plus sign></a> <a href='#interval term 1'><interval term 1></a><br> | <a href='#interval value expression 1'><interval value expression 1></a> <a href='#minus sign'><minus sign></a> <a href='#interval term 1'><interval term 1></a><br> | <a href='#left paren'><left paren></a> <a href='#datetime value expression'><datetime value expression></a> <a href='#minus sign'><minus sign></a> <a href='#datetime term'><datetime term></a> <a href='#right paren'><right paren></a> <a href='#interval qualifier'><interval qualifier></a>
<p><a href="#xref-interval value expression 1" name="interval value expression 1"> <interval value expression 1> </a> ::= <a href='#interval value expression'><interval value expression></a>
<p><a href="#xref-interval term 1" name="interval term 1"> <interval term 1> </a> ::= <a href='#interval term'><interval term></a>
<p><a href="#xref-datetime term" name="datetime term"> <datetime term> </a> ::= <a href='#datetime factor'><datetime factor></a>
<p><a href="#xref-datetime factor" name="datetime factor"> <datetime factor> </a> ::= <a href='#datetime primary'><datetime primary></a> [ <a href='#time zone'><time zone></a> ]
<p><a href="#xref-datetime primary" name="datetime primary"> <datetime primary> </a> ::= <a href='#value expression primary'><value expression primary></a> | <a href='#datetime value function'><datetime value function></a>
<p><a href="#xref-time zone" name="time zone"> <time zone> </a> ::= <a href="#xref-AT"> AT </a> <a href='#time zone specifier'><time zone specifier></a>
<p><a href="#xref-time zone specifier" name="time zone specifier"> <time zone specifier> </a> ::= <a href="#xref-LOCAL"> LOCAL </a> | <a href="#xref-TIME"> TIME </a> <a href="#xref-ZONE"> ZONE </a> <a href='#interval value expression'><interval value expression></a>
<p><a href="#xref-length expression" name="length expression"> <length expression> </a> ::= <a href='#char length expression'><char length expression></a> | <a href='#octet length expression'><octet length expression></a> | <a href='#bit length expression'><bit length expression></a>
<p><a href="#xref-char length expression" name="char length expression"> <char length expression> </a> ::= { <a href="#xref-CHAR_LENGTH"> CHAR_LENGTH </a> | <a href="#xref-CHARACTER_LENGTH"> CHARACTER_LENGTH </a> } <a href='#left paren'><left paren></a> <a href='#string value expression'><string value expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-string value expression" name="string value expression"> <string value expression> </a> ::= <a href='#character value expression'><character value expression></a> | <a href='#bit value expression'><bit value expression></a>
<p><a href="#xref-octet length expression" name="octet length expression"> <octet length expression> </a> ::= <a href="#xref-OCTET_LENGTH"> OCTET_LENGTH </a> <a href='#left paren'><left paren></a> <a href='#string value expression'><string value expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-bit length expression" name="bit length expression"> <bit length expression> </a> ::= <a href="#xref-BIT_LENGTH"> BIT_LENGTH </a> <a href='#left paren'><left paren></a> <a href='#string value expression'><string value expression></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-null specification" name="null specification"> <null specification> </a> ::= <a href="#xref-NULL"> NULL </a>
<p><a href="#xref-default specification" name="default specification"> <default specification> </a> ::= <a href="#xref-DEFAULT"> DEFAULT </a>
<p><a href="#xref-row value constructor list" name="row value constructor list"> <row value constructor list> </a> ::= <a href='#row value constructor element'><row value constructor element></a> [ { <a href='#comma'><comma></a> <a href='#row value constructor element'><row value constructor element></a> } ... ]
<p><a href="#xref-row subquery" name="row subquery"> <row subquery> </a> ::= <a href='#subquery'><subquery></a>
<p><a href="#xref-comp op" name="comp op"> <comp op> </a> ::=
<br> <a href='#equals operator'><equals operator></a><br> | <a href='#not equals operator'><not equals operator></a><br> | <a href='#less than operator'><less than operator></a><br> | <a href='#greater than operator'><greater than operator></a><br> | <a href='#less than or equals operator'><less than or equals operator></a><br> | <a href='#greater than or equals operator'><greater than or equals operator></a>
<p><a href="#xref-between predicate" name="between predicate"> <between predicate> </a> ::=
<br> <a href='#row value constructor'><row value constructor></a> [ <a href="#xref-NOT"> NOT </a> ] <a href="#xref-BETWEEN"> BETWEEN </a> <a href='#row value constructor'><row value constructor></a> <a href="#xref-AND"> AND </a> <a href='#row value constructor'><row value constructor></a>
<p><a href="#xref-in predicate" name="in predicate"> <in predicate> </a> ::= <a href='#row value constructor'><row value constructor></a> [ <a href="#xref-NOT"> NOT </a> ] <a href="#xref-IN"> IN </a> <a href='#in predicate value'><in predicate value></a>
<p><a href="#xref-in predicate value" name="in predicate value"> <in predicate value> </a> ::= <a href='#table subquery'><table subquery></a> | <a href='#left paren'><left paren></a> <a href='#in value list'><in value list></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-in value list" name="in value list"> <in value list> </a> ::= <a href='#value expression'><value expression></a> { <a href='#comma'><comma></a> <a href='#value expression'><value expression></a> } ...
<p><a href="#xref-like predicate" name="like predicate"> <like predicate> </a> ::= <a href='#match value'><match value></a> [ <a href="#xref-NOT"> NOT </a> ] <a href="#xref-LIKE"> LIKE </a> <a href='#pattern'><pattern></a> [ <a href="#xref-ESCAPE"> ESCAPE </a> <a href='#escape character'><escape character></a> ]
<p><a href="#xref-match value" name="match value"> <match value> </a> ::= <a href='#character value expression'><character value expression></a>
<p><a href="#xref-pattern" name="pattern"> <pattern> </a> ::= <a href='#character value expression'><character value expression></a>
<p><a href="#xref-escape character" name="escape character"> <escape character> </a> ::= <a href='#character value expression'><character value expression></a>
<p><a href="#xref-null predicate" name="null predicate"> <null predicate> </a> ::= <a href='#row value constructor'><row value constructor></a> <a href="#xref-IS"> IS </a> [ <a href="#xref-NOT"> NOT </a> ] <a href="#xref-NULL"> NULL </a>
<p><a href="#xref-quantified comparison predicate" name="quantified comparison predicate"> <quantified comparison predicate> </a> ::= <a href='#row value constructor'><row value constructor></a> <a href='#comp op'><comp op></a> <a href='#quantifier'><quantifier></a> <a href='#table subquery'><table subquery></a>
<p><a href="#xref-quantifier" name="quantifier"> <quantifier> </a> ::= <a href='#all'><all></a> | <a href='#some'><some></a>
<p><a href="#xref-all" name="all"> <all> </a> ::= <a href="#xref-ALL"> ALL </a>
<p><a href="#xref-some" name="some"> <some> </a> ::= <a href="#xref-SOME"> SOME </a> | <a href="#xref-ANY"> ANY </a>
<p><a href="#xref-exists predicate" name="exists predicate"> <exists predicate> </a> ::= <a href="#xref-EXISTS"> EXISTS </a> <a href='#table subquery'><table subquery></a>
<p><a href="#xref-unique predicate" name="unique predicate"> <unique predicate> </a> ::= <a href="#xref-UNIQUE"> UNIQUE </a> <a href='#table subquery'><table subquery></a>
<p><a href="#xref-match predicate" name="match predicate"> <match predicate> </a> ::= <a href='#row value constructor'><row value constructor></a> <a href="#xref-MATCH"> MATCH </a> [ <a href="#xref-UNIQUE"> UNIQUE </a> ] [ <a href="#xref-PARTIAL"> PARTIAL </a> | <a href="#xref-FULL"> FULL </a> ] <a href='#table subquery'><table subquery></a>
<p><a href="#xref-overlaps predicate" name="overlaps predicate"> <overlaps predicate> </a> ::= <a href='#row value constructor 1'><row value constructor 1></a> <a href="#xref-OVERLAPS"> OVERLAPS </a> <a href='#row value constructor 2'><row value constructor 2></a>
<p><a href="#xref-row value constructor 1" name="row value constructor 1"> <row value constructor 1> </a> ::= <a href='#row value constructor'><row value constructor></a>
<p><a href="#xref-row value constructor 2" name="row value constructor 2"> <row value constructor 2> </a> ::= <a href='#row value constructor'><row value constructor></a>
<p><a href="#xref-truth value" name="truth value"> <truth value> </a> ::= <a href="#xref-TRUE"> TRUE </a> | <a href="#xref-FALSE"> FALSE </a> | <a href="#xref-UNKNOWN"> UNKNOWN </a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> More about constraints
</h2>
<p><a href="#xref-constraint attributes" name="constraint attributes"> <constraint attributes> </a> ::=
<br> <a href='#constraint check time'><constraint check time></a> [ [ <a href="#xref-NOT"> NOT </a> ] <a href="#xref-DEFERRABLE"> DEFERRABLE </a> ]<br> | [ <a href="#xref-NOT"> NOT </a> ] <a href="#xref-DEFERRABLE"> DEFERRABLE </a> [ <a href='#constraint check time'><constraint check time></a> ]
<p><a href="#xref-constraint check time" name="constraint check time"> <constraint check time> </a> ::= <a href="#xref-INITIALLY"> INITIALLY </a> <a href="#xref-DEFERRED"> DEFERRED </a> | <a href="#xref-INITIALLY"> INITIALLY </a> <a href="#xref-IMMEDIATE"> IMMEDIATE </a>
<p><a href="#xref-table constraint definition" name="table constraint definition"> <table constraint definition> </a> ::= [ <a href='#constraint name definition'><constraint name definition></a> ] <a href='#table constraint'><table constraint></a> [ <a href='#constraint check time'><constraint check time></a> ]
<p><a href="#xref-table constraint" name="table constraint"> <table constraint> </a> ::=
<br> <a href='#unique constraint definition'><unique constraint definition></a><br> | <a href='#referential constraint definition'><referential constraint definition></a><br> | <a href='#check constraint definition'><check constraint definition></a>
<p><a href="#xref-unique constraint definition" name="unique constraint definition"> <unique constraint definition> </a> ::= <a href='#unique specification'><unique specification></a> <a href='#left paren'><left paren></a> <a href='#unique column list'><unique column list></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-unique column list" name="unique column list"> <unique column list> </a> ::= <a href='#column name list'><column name list></a>
<p><a href="#xref-referential constraint definition" name="referential constraint definition"> <referential constraint definition> </a> ::=
<br> <a href="#xref-FOREIGN"> FOREIGN </a> <a href="#xref-KEY"> KEY </a> <a href='#left paren'><left paren></a> <a href='#referencing columns'><referencing columns></a> <a href='#right paren'><right paren></a> <a href='#references specification'><references specification></a>
<p><a href="#xref-referencing columns" name="referencing columns"> <referencing columns> </a> ::= <a href='#reference column list'><reference column list></a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> Module contents
</h2>
<p><a href="#xref-module contents" name="module contents"> <module contents> </a> ::=
<br> <a href='#declare cursor'><declare cursor></a><br> | <a href='#dynamic declare cursor'><dynamic declare cursor></a><br> | <a href='#procedure'><procedure></a>
<p><a href="#xref-declare cursor" name="declare cursor"> <declare cursor> </a> ::=
<br> <a href="#xref-DECLARE"> DECLARE </a> <a href='#cursor name'><cursor name></a> [ <a href="#xref-INSENSITIVE"> INSENSITIVE </a> ] [ <a href="#xref-SCROLL"> SCROLL </a> ] <a href="#xref-CURSOR"> CURSOR </a> <a href="#xref-FOR"> FOR </a> <a href='#cursor specification'><cursor specification></a>
<p><a href="#xref-cursor name" name="cursor name"> <cursor name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-cursor specification" name="cursor specification"> <cursor specification> </a> ::= <a href='#query expression'><query expression></a> [ <a href='#order by clause'><order by clause></a> ] [ <a href='#updatability clause'><updatability clause></a> ]
<p><a href="#xref-order by clause" name="order by clause"> <order by clause> </a> ::= <a href="#xref-ORDER"> ORDER </a> <a href="#xref-BY"> BY </a> <a href='#sort specification list'><sort specification list></a>
<p><a href="#xref-sort specification list" name="sort specification list"> <sort specification list> </a> ::= <a href='#sort specification'><sort specification></a> [ { <a href='#comma'><comma></a> <a href='#sort specification'><sort specification></a> }... ]
<p><a href="#xref-sort specification" name="sort specification"> <sort specification> </a> ::= <a href='#sort key'><sort key></a> [ <a href='#collate clause'><collate clause></a> ] [ <a href='#ordering specification'><ordering specification></a> ]
<p><a href="#xref-sort key" name="sort key"> <sort key> </a> ::= <a href='#column name'><column name></a> | <a href='#unsigned integer'><unsigned integer></a>
<p><a href="#xref-ordering specification" name="ordering specification"> <ordering specification> </a> ::= <a href="#xref-ASC"> ASC </a> | <a href="#xref-DESC"> DESC </a>
<p><a href="#xref-updatability clause" name="updatability clause"> <updatability clause> </a> ::= <a href="#xref-FOR"> FOR </a> { <a href="#xref-READ"> READ </a> <a href="#xref-ONLY"> ONLY </a> | <a href="#xref-UPDATE"> UPDATE </a> [ <a href="#xref-OF"> OF </a> <a href='#column name list'><column name list></a> ] }
<p><a href="#xref-dynamic declare cursor" name="dynamic declare cursor"> <dynamic declare cursor> </a> ::=
<br> <a href="#xref-DECLARE"> DECLARE </a> <a href='#cursor name'><cursor name></a> [ <a href="#xref-INSENSITIVE"> INSENSITIVE </a> ] [ <a href="#xref-SCROLL"> SCROLL </a> ] <a href="#xref-CURSOR"> CURSOR </a> <a href="#xref-FOR"> FOR </a> <a href='#statement name'><statement name></a>
<p><a href="#xref-statement name" name="statement name"> <statement name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> SQL Procedures
</h2>
<p><a href="#xref-procedure" name="procedure"> <procedure> </a> ::=
<br> <a href="#xref-PROCEDURE"> PROCEDURE </a> <a href='#procedure name'><procedure name></a> <a href='#parameter declaration list'><parameter declaration list></a> <a href='#semicolon'><semicolon></a> <a href='#SQL procedure statement'><SQL procedure statement></a> <a href='#semicolon'><semicolon></a>
<p><a href="#xref-procedure name" name="procedure name"> <procedure name> </a> ::= <a href='#identifier'><identifier></a>
<p><a href="#xref-parameter declaration list" name="parameter declaration list"> <parameter declaration list> </a> ::=
<br> <a href='#left paren'><left paren></a> <a href='#parameter declaration'><parameter declaration></a> [ { <a href='#comma'><comma></a> <a href='#parameter declaration'><parameter declaration></a> }... ] <a href='#right paren'><right paren></a>
<p><a href="#xref-parameter declaration" name="parameter declaration"> <parameter declaration> </a> ::= <a href='#parameter name'><parameter name></a> <a href='#data type'><data type></a> | <a href='#status parameter'><status parameter></a>
<p><a href="#xref-status parameter" name="status parameter"> <status parameter> </a> ::= <a href="#xref-SQLCODE"> SQLCODE </a> | <a href="#xref-SQLSTATE"> SQLSTATE </a>
<p><a href="#xref-SQL procedure statement" name="SQL procedure statement"> <SQL procedure statement> </a> ::=
<br> <a href='#SQL schema statement'><SQL schema statement></a><br> | <a href='#SQL data statement'><SQL data statement></a><br> | <a href='#SQL transaction statement'><SQL transaction statement></a><br> | <a href='#SQL connection statement'><SQL connection statement></a><br> | <a href='#SQL session statement'><SQL session statement></a><br> | <a href='#SQL dynamic statement'><SQL dynamic statement></a><br> | <a href='#SQL diagnostics statement'><SQL diagnostics statement></a>
<p><a href='#top'>Top</a></p>
<hr>
<h2> SQL Schema Definition Statements
</h2>
<p><a href="#xref-SQL schema statement" name="SQL schema statement"> <SQL schema statement> </a> ::=
<br> <a href='#SQL schema definition statement'><SQL schema definition statement></a><br> | <a href='#SQL schema manipulation statement'><SQL schema manipulation statement></a>
<p><a href="#xref-SQL schema definition statement" name="SQL schema definition statement"> <SQL schema definition statement> </a> ::=
<br> <a href='#schema definition'><schema definition></a><br> | <a href='#table definition'><table definition></a><br> | <a href='#view definition'><view definition></a><br> | <a href='#grant statement'><grant statement></a><br> | <a href='#domain definition'><domain definition></a><br> | <a href='#character set definition'><character set definition></a><br> | <a href='#collation definition'><collation definition></a><br> | <a href='#translation definition'><translation definition></a><br> | <a href='#assertion definition'><assertion definition></a>
<p><a href="#xref-schema definition" name="schema definition"> <schema definition> </a> ::=
<br> <a href="#xref-CREATE"> CREATE </a> <a href="#xref-SCHEMA"> SCHEMA </a> <a href='#schema name clause'><schema name clause></a><br> [ <a href='#schema character set specification'><schema character set specification></a> ]<br> [ <a href='#schema element'><schema element></a> ... ]
<p><a href="#xref-schema name clause" name="schema name clause"> <schema name clause> </a> ::=
<br> <a href='#schema name'><schema name></a><br> | <a href="#xref-AUTHORIZATION"> AUTHORIZATION </a> <a href='#schema authorization identifier'><schema authorization identifier></a><br> | <a href='#schema name'><schema name></a> <a href="#xref-AUTHORIZATION"> AUTHORIZATION </a> <a href='#schema authorization identifier'><schema authorization identifier></a>
<p><a href="#xref-schema authorization identifier" name="schema authorization identifier"> <schema authorization identifier> </a> ::= <a href='#authorization identifier'><authorization identifier></a>
<p><a href="#xref-schema character set specification" name="schema character set specification"> <schema character set specification> </a> ::= <a href="#xref-DEFAULT"> DEFAULT </a> <a href="#xref-CHARACTER"> CHARACTER </a> <a href="#xref-SET"> SET </a> <a href='#character set specification'><character set specification></a>
<p><a href="#xref-schema element" name="schema element"> <schema element> </a> ::=
<br> <a href='#domain definition'><domain definition></a><br> | <a href='#table definition'><table definition></a><br> | <a href='#view definition'><view definition></a><br> | <a href='#grant statement'><grant statement></a><br> | <a href='#assertion definition'><assertion definition></a><br> | <a href='#character set definition'><character set definition></a><br> | <a href='#collation definition'><collation definition></a><br> | <a href='#translation definition'><translation definition></a>
<p><a href="#xref-domain definition" name="domain definition"> <domain definition> </a> ::=
<br> <a href="#xref-CREATE"> CREATE </a> <a href="#xref-DOMAIN"> DOMAIN </a> <a href='#domain name'><domain name></a> [ <a href="#xref-AS"> AS </a> ] <a href='#data type'><data type></a><br> [ <a href='#default clause'><default clause></a> ] [ <a href='#domain constraint'><domain constraint></a> ] [ <a href='#collate clause'><collate clause></a> ]
<p><a href="#xref-domain constraint" name="domain constraint"> <domain constraint> </a> ::=
<br> [ <a href='#constraint name definition'><constraint name definition></a> ] <a href='#check constraint definition'><check constraint definition></a> [ <a href='#constraint attributes'><constraint attributes></a> ]
<p><a href="#xref-table definition" name="table definition"> <table definition> </a> ::=
<br> <a href="#xref-CREATE"> CREATE </a> [ { <a href="#xref-GLOBAL"> GLOBAL </a> | <a href="#xref-LOCAL"> LOCAL </a> } <a href="#xref-TEMPORARY"> TEMPORARY </a> ] <a href="#xref-TABLE"> TABLE </a> <a href='#table name'><table name></a> <a href='#table element list'><table element list></a> [ <a href="#xref-ON"> ON </a> <a href="#xref-COMMIT"> COMMIT </a> { <a href="#xref-DELETE"> DELETE </a> | <a href="#xref-PRESERVE"> PRESERVE </a> } <a href="#xref-ROWS"> ROWS </a> ]
<p><a href="#xref-view definition" name="view definition"> <view definition> </a> ::=
<br> <a href="#xref-CREATE"> CREATE </a> <a href="#xref-VIEW"> VIEW </a> <a href='#table name'><table name></a> [ <a href='#left paren'><left paren></a> <a href='#view column list'><view column list></a> <a href='#right paren'><right paren></a> ]<br> <a href="#xref-AS"> AS </a> <a href='#query expression'><query expression></a> [ <a href="#xref-WITH"> WITH </a> [ <a href='#levels clause'><levels clause></a> ] <a href="#xref-CHECK"> CHECK </a> <a href="#xref-OPTION"> OPTION </a> ]
<p><a href="#xref-view column list" name="view column list"> <view column list> </a> ::= <a href='#column name list'><column name list></a>
<p><a href="#xref-levels clause" name="levels clause"> <levels clause> </a> ::= <a href="#xref-CASCADED"> CASCADED </a> | <a href="#xref-LOCAL"> LOCAL </a>
<p><a href="#xref-grant statement" name="grant statement"> <grant statement> </a> ::=
<br> <a href="#xref-GRANT"> GRANT </a> <a href='#privileges'><privileges></a> <a href="#xref-ON"> ON </a> <a href='#object name'><object name></a> <a href="#xref-TO"> TO </a> <a href='#grantee'><grantee></a> [ { <a href='#comma'><comma></a> <a href='#grantee'><grantee></a> }... ] [ <a href="#xref-WITH"> WITH </a> <a href="#xref-GRANT"> GRANT </a> <a href="#xref-OPTION"> OPTION </a> ]
<p><a href="#xref-privileges" name="privileges"> <privileges> </a> ::= <a href="#xref-ALL"> ALL </a> <a href="#xref-PRIVILEGES"> PRIVILEGES </a> | <a href='#action list'><action list></a>
<p><a href="#xref-action list" name="action list"> <action list> </a> ::= <a href='#action'><action></a> [ { <a href='#comma'><comma></a> <a href='#action'><action></a> }... ]
<p><a href="#xref-action" name="action"> <action> </a> ::=
<br> <a href="#xref-SELECT"> SELECT </a><br> | <a href="#xref-DELETE"> DELETE </a><br> | <a href="#xref-INSERT"> INSERT </a> [ <a href='#left paren'><left paren></a> <a href='#privilege column list'><privilege column list></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-UPDATE"> UPDATE </a> [ <a href='#left paren'><left paren></a> <a href='#privilege column list'><privilege column list></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-REFERENCES"> REFERENCES </a> [ <a href='#left paren'><left paren></a> <a href='#privilege column list'><privilege column list></a> <a href='#right paren'><right paren></a> ]<br> | <a href="#xref-USAGE"> USAGE </a>
<p><a href="#xref-privilege column list" name="privilege column list"> <privilege column list> </a> ::= <a href='#column name list'><column name list></a>
<p><a href="#xref-object name" name="object name"> <object name> </a> ::=
<br> [ <a href="#xref-TABLE"> TABLE </a> ] <a href='#table name'><table name></a><br> | <a href="#xref-DOMAIN"> DOMAIN </a> <a href='#domain name'><domain name></a><br> | <a href="#xref-COLLATION"> COLLATION </a> <a href='#collation name'><collation name></a><br> | <a href="#xref-CHARACTER"> CHARACTER </a> <a href="#xref-SET"> SET </a> <a href='#character set name'><character set name></a><br> | <a href="#xref-TRANSLATION"> TRANSLATION </a> <a href='#translation name'><translation name></a>
<p><a href="#xref-grantee" name="grantee"> <grantee> </a> ::= <a href="#xref-PUBLIC"> PUBLIC </a> | <a href='#authorization identifier'><authorization identifier></a>
<p><a href="#xref-assertion definition" name="assertion definition"> <assertion definition> </a> ::=
<br> <a href="#xref-CREATE"> CREATE </a> <a href="#xref-ASSERTION"> ASSERTION </a> <a href='#constraint name'><constraint name></a> <a href='#assertion check'><assertion check></a> [ <a href='#constraint attributes'><constraint attributes></a> ]
<p><a href="#xref-assertion check" name="assertion check"> <assertion check> </a> ::= <a href="#xref-CHECK"> CHECK </a> <a href='#left paren'><left paren></a> <a href='#search condition'><search condition></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-character set definition" name="character set definition"> <character set definition> </a> ::=
<br> <a href="#xref-CREATE"> CREATE </a> <a href="#xref-CHARACTER"> CHARACTER </a> <a href="#xref-SET"> SET </a> <a href='#character set name'><character set name></a> [ <a href="#xref-AS"> AS </a> ] <a href='#character set source'><character set source></a><br> [ <a href='#collate clause'><collate clause></a> | <a href='#limited collation definition'><limited collation definition></a> ]
<p><a href="#xref-character set source" name="character set source"> <character set source> </a> ::= <a href="#xref-GET"> GET </a> <a href='#existing character set name'><existing character set name></a>
<p><a href="#xref-existing character set name" name="existing character set name"> <existing character set name> </a> ::=
<br> <a href='#standard character repertoire name'><standard character repertoire name></a><br> | <a href='#implementation-defined character repertoire name'><implementation-defined character repertoire name></a><br> | <a href='#schema character set name'><schema character set name></a>
<p><a href="#xref-schema character set name" name="schema character set name"> <schema character set name> </a> ::= <a href='#character set name'><character set name></a>
<p><a href="#xref-limited collation definition" name="limited collation definition"> <limited collation definition> </a> ::=
<br> <a href="#xref-COLLATION"> COLLATION </a> <a href="#xref-FROM"> FROM </a> <a href='#collation source'><collation source></a>
<p><a href="#xref-collation source" name="collation source"> <collation source> </a> ::= <a href='#collating sequence definition'><collating sequence definition></a> | <a href='#translation collation'><translation collation></a>
<p><a href="#xref-collating sequence definition" name="collating sequence definition"> <collating sequence definition> </a> ::=
<br> <a href='#external collation'><external collation></a><br> | <a href='#schema collation name'><schema collation name></a><br> | <a href="#xref-DESC"> DESC </a> <a href='#left paren'><left paren></a> <a href='#collation name'><collation name></a> <a href='#right paren'><right paren></a><br> | <a href="#xref-DEFAULT"> DEFAULT </a>
<p><a href="#xref-external collation" name="external collation"> <external collation> </a> ::=
<br> <a href="#xref-EXTERNAL"> EXTERNAL </a> <a href='#left paren'><left paren></a> <a href='#quote'><quote></a> <a href='#external collation name'><external collation name></a> <a href='#quote'><quote></a> <a href='#right paren'><right paren></a>
<p><a href="#xref-external collation name" name="external collation name"> <external collation name> </a> ::= <a href='#standard collation name'><standard collation name></a> | <a href='#implementation-defined collation name'><implementation-defined collation name></a>
<p><a href="#xref-standard collation name" name="standard collation name"> <standard collation name> </a> ::= <a href='#collation name'><collation name></a>
<p><a href="#xref-implementation-defined collation name" name="implementation-defined collation name"> <implementation-defined collation name> </a> ::= <a href='#collation name'><collation name></a>
<p><a href="#xref-schema collation name" name="schema collation name"> <schema collation name> </a> ::= <a href='#collation name'><collation name></a>
<p><a href="#xref-translation collation" name="translation collation"> <translation collation> </a> ::= <a href="#xref-TRANSLATION"> TRANSLATION </a> <a href='#translation name'><translation name></a> [ <a href="#xref-THEN"> THEN </a> <a href="#xref-COLLATION"> COLLATION </a> <a href='#collation name'><collation name></a> ]