Learn to see Oracle SQL syntax

xiaoxiao2021-03-06  117

In order to live, translate the article, I hope to help everyone.

Oracle8i SQL ReferenceRelease 8.1.5a67779-01

LibraryProductContentsindex

SQL syntax diagram

A picture can be a thousand words.

Anonymous text, my dance is informed

The chart is used to explain the syntax of SQL. When viewing, from left to right, look along the arrow.

Commands and keywords in box. Write them correctly when writing statements. The words in the lower-write ellipse are variables. The circle is the punctuation, operators and separators and endors.

If there is more than one path, you can choose one of them.

If you have more than one keyword, operator, parameter selection, your options are in a vertical list.

Must-keywords and parameters

The necessary keywords and parameters can appear on one line or in a selectable vertical column. Single must have a keyword and parameter appear on the main path, on the horizontal line you are now.

If there is a library called HQ_LIB, then according to this picture, the write method below is legal:

DROP library hq_lib;

If multiple crosses appear on the horizontal line, you must choose one of them:

Optional keywords and parameters

If you appear on the main path, as shown in the following, you can walk directly according to the main path.

All of the following writes are legal:

DEAALLOCATE UNUSED;

DEAALLOCATE UNUSED KEEP 1000;

Deallocate Unused Keep 10M;

Cycle syntax

Cycling can be repeated in a number of times you need.

Multi-part chart

Reading a multi-segment chart, such as all the primary paths are connected, and the following example shows two parts:

According to this figure, it is legal as follows:

Create Outline on Update;

Database object

The name, icon table or column of the Oracle identifier, can not exceed 30 characters. The first character must be letters, but the remaining characters (ie can be spaced), numbers, dollar symbols ($ ), Pound symbol (#), and underline (_).

No matter how, if the Oracle's identifier is paid ("), it can be the combination of any legal characters, including spaces, but not single quotes and double quotes.

When paid ("), Oracle's identifier is not sensitive.

For more information, see "schema object naming rules".

PrevNextCopyright © 1999 Oracle Corporation. All Rights Reserved.

LibraryProductContentsindex