Skip Headers
Oracle® Database Lite SQL Reference
Release 10.3

Part Number E12092-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

A Syntax Diagram Conventions

This document discusses the syntax diagrams used in the Oracle Database Lite SQL Reference. Topics include:

A.1 Introduction

Syntax diagrams are drawings that illustrate valid SQL syntax. To read a diagram, trace it from left to right, in the direction shown by the arrows.

Commands and other keywords appear in UPPERCASE inside rectangles. Type them exactly as shown in the rectangles. Parameters appear in lowercase inside ovals. Variables are used for the parameters. Punctuation, operators, delimiters, and terminators appear inside circles.

If the syntax diagram has more than one path, you can choose any path to travel.

If you have the choice of more than one keyword, operator, or parameter, your options appear in a vertical list.

A.2 Required Keywords and Parameters

Required keywords and parameters can appear singly or in a vertical list of alternatives. Single required keywords and parameters appear on the main path, that is, on the horizontal line you are currently traveling. In Figure A-1, user and password are required parameters:

Figure A-1 Syntax for Required Keywords and Parameters

Syntax diagram for required keywords and parameters.
Description of "Figure A-1 Syntax for Required Keywords and Parameters"

BNF Notation

CREATE USER user IDENTIFIED  BY password;

According to the diagram, the following syntax is valid:

CREATE USER hannibal IDENTIFIED BY hanna;

In Figure A-2, either DELETE, SELECT, or UPDATE is a required parameter:

Figure A-2 Syntax for Required Parameters

Syntax diagram for delete, select, or update.
Description of "Figure A-2 Syntax for Required Parameters"

BNF Notation

{ DELETE | SELECT | UPDATE } //hint// ;

A.3 Optional Keywords and Parameters

If keywords and parameters appear in a vertical list above the main path, they are optional. In Figure A-3, you can choose from the vertical list of options or you can continue along the main path:

Figure A-3 Syntax for Required Optional Keywords and Parameters

Required optional keywords and parameters.
Description of "Figure A-3 Syntax for Required Optional Keywords and Parameters"

BNF Notation

ROLLBACK [{ WORK | TO savepoint_name }] ;

According to the diagram, all of the following statements are valid:

ROLLBACK WORK;
ROLLBACK TO savepoint_1;
ROLLBACK;

A.4 Syntax Loops

Loops enable you to repeat the syntax within them as many times as you like. In Figure A-4, after choosing one expression, you can go back repeatedly to choose another, separated by commas.

BNF Notation

[ expr [, expr]...]

A.5 Multipart Diagrams

Read a multipart diagram as if all the main paths were joined end to end. The example in Figure A-5 is a two-part diagram:

Figure A-5 Syntax for a Multipart Diagram

Syntax for a multipart diagram
Description of "Figure A-5 Syntax for a Multipart Diagram"

BNF Notation

CREATE [PUBLIC] SYNONYM [schema ] synonym FOR [schema ] object ;

According to the diagram, the following statements are valid:

CREATE SYNONYM prod FOR product;
CREATE SYNONYM prod FOR scott.product;
CREATE SYNONYM scott.prod FOR scott.product;

A.6 Database Objects

The names of Oracle Lite identifiers, such as tables and columns, must not exceed 30 characters in length. The first character must be a letter, but the rest can be any combination of letters, numerals, dollar signs ($), pound signs (#), and underscores (_).

However, if an Oracle Lite identifier is enclosed by double quotation marks ("), it can contain any combination of legal characters, including spaces but excluding quotation marks. Oracle Lite identifiers are not case-sensitive except when enclosed by double quotation marks.

A.7 BNF Notation

The syntax diagrams in this document use a variation of Backus-Nauer Form (BNF) notation. For a description of the convention used in this document, please see Section 4.2.6, "BNF Notation Conventions".