BNF Index of SQL2

index on key words

index on special characters


[other languages BNF]

distinct syntax trees in the SQL2 language

SQL2 which may be directly invoked

direct_sql_stmt

Lexical rules

token
separator

Module language

module

Dynamic commands

prep_stmt

Embedded SQL languages

embdd_sql_host_program
embdd_sql_declare_section
embdd_sql_stmt
embdd_exception_decl

abbreviation used in rule's names

author authorization
char   character
dec    declaration
def    defined
def    definition
diag   diagnostics
dyn    dynamic
embdd  embedded
exec   executable
exp    expression
fct    function
frac   fractional
id     identifier
implt  implementation
lit    literal
num    numeric
op     operator
pos    positionned
ref    referential
rep    repertoire
spec   specification
std    standard
stmt   statement
univ   universal

index of rules

  1. action
  2. action_list
  3. actual_id
  4. ada_assignment_op
  5. ada_host_id
  6. ada_initial_value
  7. ada_qualified_type_spec
  8. ada_type_spec
  9. ada_unqualified_type_spec
  10. ada_variable_def
  11. add_column_def
  12. add_domain_constraint_def
  13. add_table_constraint_def
  14. all
  15. allocate_cursor_stmt
  16. allocate_descriptor_stmt
  17. alter_column_action
  18. alter_column_def
  19. alter_domain_action
  20. alter_domain_stmt
  21. alter_table_action
  22. alter_table_stmt
  23. ampersand
  24. approximate_num_lit
  25. approximate_num_type
  26. arc1
  27. arc2
  28. arc3
  29. argument
  30. assertion_check
  31. assertion_def
  32. asterisk
  33. as_clause
  34. between_predicate
  35. bit
  36. bit_concatenation
  37. bit_factor
  38. bit_length_exp
  39. bit_primary
  40. bit_string_lit
  41. bit_string_type
  42. bit_substring_fct
  43. bit_value_exp
  44. bit_value_fct
  45. boolean_factor
  46. boolean_primary
  47. boolean_term
  48. boolean_test
  49. case_abbreviation
  50. case_exp
  51. case_operand
  52. case_spec
  53. cast_operand
  54. cast_spec
  55. cast_target
  56. catalog_name
  57. char_factor
  58. char_length_exp
  59. char_primary
  60. char_representation
  61. char_set_def
  62. char_set_name
  63. char_set_source
  64. char_set_spec
  65. char_string_lit
  66. char_string_type
  67. char_substring_fct
  68. char_translation
  69. char_value_exp
  70. char_value_fct
  71. check_constraint_def
  72. close_stmt
  73. cobol_binary_integer
  74. cobol_bit_type
  75. cobol_char_type
  76. cobol_computational_int
  77. cobol_host_id
  78. cobol_integer_type
  79. cobol_nines
  80. cobol_nines_spec
  81. cobol_num_type
  82. cobol_type_spec
  83. cobol_variable_def
  84. collate_clause
  85. collating_sequence_def
  86. collation_def
  87. collation_name
  88. collation_source
  89. colon
  90. column_constraint
  91. column_constraint_def
  92. column_def
  93. column_name
  94. column_name_list
  95. column_ref
  96. comma
  97. comment
  98. comment_char
  99. comment_introducer
  100. commit_stmt
  101. comp_op
  102. comp_predicate
  103. concatenation
  104. condition
  105. condition_action
  106. condition_information
  107. condition_information_item
  108. condition_info_item_name
  109. condition_number
  110. connection_name
  111. connection_object
  112. connection_target
  113. connect_stmt
  114. constraint_attributes
  115. constraint_check_time
  116. constraint_name
  117. constraint_name_def
  118. constraint_name_list
  119. correlation_name
  120. corresponding_column_list
  121. corresponding_spec
  122. cross_join
  123. currenttimestamp_value_fct
  124. current_date_value_fct
  125. current_time_value_fct
  126. cursor_name
  127. cursor_spec
  128. c_array_spec
  129. c_bit_variable
  130. c_char_variable
  131. c_class_modifier
  132. c_derived_variable
  133. c_host_id
  134. c_initial_value
  135. c_num_variable
  136. c_storage_class
  137. c_varchar_variable
  138. c_variable_def
  139. c_variable_spec
  140. data_type
  141. datetime_factor
  142. datetime_field
  143. datetime_lit
  144. datetime_primary
  145. datetime_term
  146. datetime_type
  147. datetime_value
  148. datetime_value_exp
  149. datetime_value_fct
  150. date_lit
  151. date_string
  152. date_value
  153. days_value
  154. deallocate_descriptor_stmt
  155. deallocate_prepared_stmt
  156. declare_cursor
  157. default_clause
  158. default_option
  159. default_spec
  160. delete_rule
  161. delete_stmt_pos
  162. delete_stmt_searched
  163. delimited_id
  164. delimited_id_body
  165. delimited_id_part
  166. delimiter_token
  167. derived_column
  168. derived_column_list
  169. derived_table
  170. describe_input_stmt
  171. describe_output_stmt
  172. describe_stmt
  173. descriptor_item_name
  174. descriptor_name
  175. diag_size
  176. digit
  177. directly_exec_stmt
  178. direct_implt_def_stmt
  179. direct_select_stmt_n_rows
  180. direct_sql_data_stmt
  181. direct_sql_stmt
  182. disconnect_object
  183. disconnect_stmt
  184. domain_constraint
  185. domain_def
  186. domain_name
  187. doublequote_symbol
  188. double_quote
  189. drop_assertion_stmt
  190. drop_behavior
  191. drop_char_set_stmt
  192. drop_collation_stmt
  193. drop_column_def
  194. drop_column_default_clause
  195. drop_domain_constraint_def
  196. drop_domain_default_clause
  197. drop_domain_stmt
  198. drop_schema_stmt
  199. drop_table_constraint_def
  200. drop_table_stmt
  201. drop_translation_stmt
  202. drop_view_stmt
  203. dyn_close_stmt
  204. dyn_cursor_name
  205. dyn_declare_cursor
  206. dyn_delete_stmt_pos
  207. dyn_fetch_stmt
  208. dyn_open_stmt
  209. dyn_parameter_spec
  210. dyn_select_stmt
  211. dyn_single_row_select_stmt
  212. dyn_update_stmt_pos
  213. e1987
  214. e1989
  215. e1989_base
  216. e1989_package
  217. e1992
  218. else_clause
  219. embdd_char_set_decl
  220. embdd_exception_decl
  221. embdd_sql_ada_program
  222. embdd_sql_begin_declare
  223. embdd_sql_cobol_program
  224. embdd_sql_c_program
  225. embdd_sql_declare_section
  226. embdd_sql_end_declare
  227. embdd_sql_fortran_program
  228. embdd_sql_host_program
  229. embdd_sql_mumps_declare
  230. embdd_sql_mumps_program
  231. embdd_sql_pascal_program
  232. embdd_sql_pl1_program
  233. embdd_sql_stmt
  234. embdd_variable_name
  235. end_field
  236. equals_op
  237. escape_char
  238. exact_num_lit
  239. exact_num_type
  240. execute_immediate_stmt
  241. execute_stmt
  242. existing_char_set_name
  243. exists_predicate
  244. explicit_table
  245. exponent
  246. extended_cursor_name
  247. extended_stmt_name
  248. external_collation
  249. external_collation_name
  250. external_translation
  251. external_translation_name
  252. extract_exp
  253. extract_field
  254. extract_source
  255. factor
  256. fetch_orientation
  257. fetch_stmt
  258. fetch_target_list
  259. fold
  260. form_conversion
  261. form_conversion_name
  262. fortran_host_id
  263. fortran_type_spec
  264. fortran_variable_def
  265. from_clause
  266. general_lit
  267. general_set_fct
  268. general_value_spec
  269. get_count
  270. get_descriptor_information
  271. get_descriptor_stmt
  272. get_diag_stmt
  273. get_item_information
  274. goto_target
  275. go_to
  276. grantee
  277. grant_stmt
  278. greater_than_op
  279. grouping_column_ref
  280. grouping_column_ref_list
  281. group_by_clause
  282. having_clause
  283. hexit
  284. hex_string_lit
  285. high
  286. host_id
  287. host_label_id
  288. host_pl1_label_variable
  289. host_variable_def
  290. hours_value
  291. id
  292. id_body
  293. id_part
  294. id_start
  295. implt_def_char_rep_name
  296. implt_def_collation_name
  297. implt_def_translation_name
  298. implt_def_univ_char_name
  299. indicator_parameter
  300. indicator_variable
  301. insert_columns_and_source
  302. insert_column_list
  303. insert_stmt
  304. integrity_no
  305. integrity_yes
  306. intermediate
  307. interval_factor
  308. interval_frac_seconds_prec
  309. interval_leading_fieldprec
  310. interval_lit
  311. interval_primary
  312. interval_qualifier
  313. interval_term
  314. interval_term_1
  315. interval_term_2
  316. interval_type
  317. interval_value_exp
  318. interval_value_exp_1
  319. introducer
  320. in_predicate
  321. in_predicate_value
  322. in_value_list
  323. isolation_level
  324. item_number
  325. joined_table
  326. join_column_list
  327. join_condition
  328. join_spec
  329. join_type
  330. key_word
  331. left_bracket
  332. left_paren
  333. length
  334. length_exp
  335. less_than_op
  336. levels_clause
  337. level_of_isolation
  338. like_predicate
  339. limited_collation_def
  340. lit
  341. local_table_name
  342. low
  343. mantissa
  344. match_predicate
  345. match_type
  346. match_value
  347. minus_sign
  348. minutes_value
  349. module_contents
  350. months_value
  351. mumps_char_variable
  352. mumps_host_id
  353. mumps_length_spec
  354. mumps_num_variable
  355. mumps_type_spec
  356. mumps_variable_def
  357. named_columns_join
  358. national_char_string_lit
  359. national_char_string_type
  360. newline
  361. next_in_c_list
  362. nondelimiter_token
  363. nondoublequote_char
  364. nonquote_char
  365. non_join_query_exp
  366. non_join_query_primary
  367. non_join_query_term
  368. non_reserved_word
  369. non_second_datetime_field
  370. null_predicate
  371. null_spec
  372. number_of_conditions
  373. num_primary
  374. num_type
  375. num_value_exp
  376. num_value_fct
  377. object_column
  378. object_name
  379. occurrences
  380. octet_length_exp
  381. open_stmt
  382. ordering_spec
  383. order_by_clause
  384. outer_join_type
  385. overlaps_predicate
  386. pad_attribute
  387. parameter_decl
  388. parameter_decl_list
  389. parameter_name
  390. parameter_spec
  391. parameter_using_clause
  392. pascal_host_id
  393. pascal_type_spec
  394. pascal_variable_def
  395. pattern
  396. percent
  397. period
  398. pl1_host_id
  399. pl1_type_fixed_binary
  400. pl1_type_fixed_decimal
  401. pl1_type_float_binary
  402. pl1_type_spec
  403. pl1_variable_def
  404. plus_sign
  405. position_exp
  406. precision
  407. predicate
  408. prepare_stmt
  409. prep_dyn_delete_stmt_pos
  410. prep_dyn_update_stmt_pos
  411. prep_implt_def_stmt
  412. prep_sql_data_stmt
  413. prep_sql_schema_stmt
  414. prep_sql_session_stmt
  415. prep_sql_transaction_stmt
  416. prep_stmt
  417. privileges
  418. privilege_column_list
  419. procedure
  420. procedure_name
  421. qualified_id
  422. qualified_join
  423. qualified_local_table_name
  424. qualified_name
  425. qualifier
  426. quantified_comp_predicate
  427. quantifier
  428. query_exp
  429. query_primary
  430. query_spec
  431. query_term
  432. question_mark
  433. quote
  434. quote_symbol
  435. refd_table_and_columns
  436. referencing_columns
  437. refs_spec
  438. ref_action
  439. ref_column_list
  440. ref_constraint_def
  441. ref_triggered_action
  442. regular_id
  443. reserved_word
  444. result
  445. result_exp
  446. result_using_clause
  447. revoke_stmt
  448. right_bracket
  449. right_paren
  450. rollback_stmt
  451. row_subquery
  452. row_value_constructor
  453. row_value_constructor_1
  454. row_value_constructor_2
  455. row_value_constructor_elem
  456. row_value_const_list
  457. scalar_subquery
  458. scale
  459. schema_author_id
  460. schema_char_set_name
  461. schema_char_set_spec
  462. schema_collation_name
  463. schema_def
  464. schema_element
  465. schema_name
  466. schema_name_clause
  467. schema_translation_name
  468. scope_option
  469. searched_case
  470. searched_when_clause
  471. search_condition
  472. seconds_integer_value
  473. seconds_value
  474. select_list
  475. select_stmt_single_row
  476. select_sublist
  477. select_target_list
  478. semicolon
  479. separator
  480. set_catalog_stmt
  481. set_clause
  482. set_clause_list
  483. set_column_default_clause
  484. set_connection_stmt
  485. set_constraints_mode_stmt
  486. set_count
  487. set_descriptor_information
  488. set_descriptor_stmt
  489. set_domain_default_clause
  490. set_fct_spec
  491. set_fct_type
  492. set_item_information
  493. set_local_time_zone_stmt
  494. set_names_stmt
  495. set_quantifier
  496. set_schema_stmt
  497. set_session_author_id_stmt
  498. set_time_zone_value
  499. set_transaction_stmt
  500. sign
  501. signed_integer
  502. signed_num_lit
  503. simple_case
  504. simple_latin_letter
  505. simple_latin_lower_letter
  506. simple_latin_upper_letter
  507. simple_table
  508. simple_target_spec
  509. simple_target_spec_1
  510. simple_target_spec_2
  511. simple_value_spec
  512. simple_value_spec_1
  513. simple_value_spec_2
  514. simple_when_clause
  515. single_datetime_field
  516. solidus
  517. some
  518. sort_key
  519. sort_spec
  520. sort_spec_list
  521. source_char_set_spec
  522. space
  523. sql_conformance
  524. sql_connection_stmt
  525. sql_data_change_stmt
  526. sql_data_stmt
  527. sql_diag_information
  528. sql_diag_stmt
  529. sql_dyn_data_stmt
  530. sql_dyn_stmt
  531. sql_edition
  532. sql_embdd_language_char
  533. sql_language_char
  534. sql_language_id
  535. sql_language_id_part
  536. sql_language_id_start
  537. sql_object_id
  538. sql_prefix
  539. sql_procedure_stmt
  540. sql_provenance
  541. sql_schema_def_stmt
  542. sql_schema_manipulat_stmt
  543. sql_schema_stmt
  544. sql_server_name
  545. sql_session_stmt
  546. sql_special_char
  547. sql_stmt_name
  548. sql_stmt_variable
  549. sql_terminal_char
  550. sql_terminator
  551. sql_transaction_stmt
  552. sql_variant
  553. start_field
  554. start_position
  555. status_parameter
  556. std_char_rep_name
  557. std_collation_name
  558. std_translation_name
  559. std_univ_char_form_name
  560. stmt_information
  561. stmt_information_item
  562. stmt_info_item_name
  563. stmt_name
  564. stmt_or_decl
  565. string_length
  566. string_value_exp
  567. string_value_fct
  568. subquery
  569. system_descriptor_stmt
  570. table_constraint
  571. table_constraint_def
  572. table_def
  573. table_element
  574. table_element_list
  575. table_exp
  576. table_name
  577. table_ref
  578. table_subquery
  579. table_value_constructor
  580. table_value_const_list
  581. target_char_set_spec
  582. target_spec
  583. temporary_table_decl
  584. term
  585. timestamp_lit
  586. timestamp_precision
  587. time_frac_seconds_prec
  588. time_lit
  589. time_precision
  590. time_string
  591. time_value
  592. time_zone
  593. time_zone_field
  594. time_zone_specifier
  595. token
  596. transaction_access_mode
  597. transaction_mode
  598. translation_collation
  599. translation_def
  600. translation_name
  601. translation_source
  602. translation_spec
  603. trim_char
  604. trim_fct
  605. trim_operands
  606. trim_source
  607. trim_spec
  608. truth_value
  609. underscore
  610. unique_column_list
  611. unique_constraint_def
  612. unique_predicate
  613. unique_spec
  614. unqualified_schema_name
  615. unsigned_integer
  616. unsigned_lit
  617. unsigned_num_lit
  618. unsigned_value_spec
  619. updatability_clause
  620. update_rule
  621. update_source
  622. update_stmt_pos
  623. update_stmt_searched
  624. user_def_char_rep_name
  625. user_name
  626. using_arguments
  627. using_clause
  628. using_descriptor
  629. value_exp
  630. value_exp_primary
  631. value_spec
  632. variable_spec
  633. vertical_bar
  634. view_column_list
  635. view_def
  636. when_operand
  637. where_clause
  638. years_value

Jacques Guyot | guyot@cui.unige.ch