행위

"오라클 구문 다이어그램"의 두 판 사이의 차이

DB CAFE

(Graphic Syntax Diagrams)
(Graphic Syntax Diagrams)
4번째 줄: 4번째 줄:
  
 
== Graphic Syntax Diagrams ==
 
== Graphic Syntax Diagrams ==
구문 다이어그램은 유효한 SQL 구문을 나타내는 도면입니다. 다이어그램을 읽으려면 화살표로 표시된 방향으로 왼쪽에서 오른쪽으로 추적하십시오.
+
구문 다이어그램은 유효한 SQL 구문을 나타내는 도면입니다.  
: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.
+
다이어그램을 읽으려면 화살표로 표시된 방향으로 왼쪽에서 오른쪽으로 추적하십시오.
 +
: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.  
+
사각형에 표시된대로 정확하게 입력하십시오.
 +
:Commands and other keywords appear in UPPERCASE inside rectangles.  
 +
Type them exactly as shown in the rectangles.  
  
 
타원 안에 매개 변수가 소문자로 나타납니다. 변수는 변수에 사용됩니다. 문장 부호, 연산자, 구분 기호 및 종결자가 원 안에 표시됩니다.
 
타원 안에 매개 변수가 소문자로 나타납니다. 변수는 변수에 사용됩니다. 문장 부호, 연산자, 구분 기호 및 종결자가 원 안에 표시됩니다.

2020년 1월 6일 (월) 17:35 판

thumb_up 추천메뉴 바로가기


1 오라클 예약어 다이어그램[편집]

https://docs.oracle.com/database/121/SQLRF/ap_syntx001.htm#SQLRF55485

1.1 Graphic Syntax Diagrams[편집]

구문 다이어그램은 유효한 SQL 구문을 나타내는 도면입니다. 다이어그램을 읽으려면 화살표로 표시된 방향으로 왼쪽에서 오른쪽으로 추적하십시오.

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, then you can choose any path.

예를 들어 , 다음 구문에서 NOPARALLEL 또는 PARALLEL을 지정할 수 있습니다.

For example, in the following syntax you can specify either NOPARALLEL or PARALLEL:

parallel_clause.gif

하나 이상의 키워드, 연산자 또는 매개 변수를 선택할 수 있으면 옵션이 세로 목록에 나타납니다. 예를 들어 다음 구문 다이어그램에서 스택에 네 개의 매개 변수 중 하나 이상을 지정할 수 있습니다.

If you have the choice of more than one keyword, operator, or parameter, then your options appear in a vertical list. For example, in the following syntax diagram, you can specify one or more of the four parameters in the stack:

physical_attributes_clause.gif


다음 표는 구문 다이어그램에 나타나는 매개 변수를 표시하고 명령문에서 대체 할 수있는 값의 예를 제공합니다.

The following table shows parameters that appear in the syntax diagrams and provides examples of the values you might substitute for them in your statements:
Parameter 설명 예시
table The substitution value must be the name of an object of the type specified by the parameter. For a list of all types of objects, see the section, "Schema Objects". employees
c

The substitution value must be a single character from your database character set.

T s

'text'

The substitution value must be a text string in single quotation marks. See the syntax description of 'text' in "Text Literals".

'Employee records'

char

The substitution value must be an expression of data type CHAR or VARCHAR2 or a character literal in single quotation marks.

last_name

'Smith'

condition

The substitution value must be a condition that evaluates to TRUE or FALSE. See the syntax description of condition in Chapter 6, "Conditions".

last_name >'A'

date

d

The substitution value must be a date constant or an expression of DATE data type.

TO_DATE(

'01-Jan-2002',

'DD-MON-YYYY')

expr

The substitution value can be an expression of any data type as defined in the syntax description of expr in "About SQL Expressions".

salary + 1000

integer

The substitution value must be an integer as defined by the syntax description of integer in "Integer Literals".

72

number

m

n

The substitution value must be an expression of NUMBER data type or a number constant as defined in the syntax description of number in "Numeric Literals".

AVG(salary)

15 * 7

raw

The substitution value must be an expression of data type RAW.

HEXTORAW('7D')

subquery

The substitution value must be a SELECT statement that will be used in another SQL statement. See SELECT.

SELECT last_name FROM employees

db_name

The substitution value must be the name of a nondefault database in an embedded SQL program.

sales_db

db_string

The substitution value must be the database identification string for an Oracle Net database connection. For details, see the user's guide for your specific Oracle Net protocol.

1.1.1 필수 키워드 와 파라미터[편집]

필수 키워드 및 매개 변수는 단독으로 또는 수직 대체 목록에 나타날 수 있습니다.

하나의 필수 키워드 및 매개 변수가 현재 이동중인 수평선 인 기본 경로에 나타납니다. 다음 예제에서 library_name은 필수 매개 변수입니다.

drop_library.gif

1.2 Backus-Naur Form (BNF) 문법[편집]

Each graphic syntax diagram in this reference is followed by a link to a text description of the graphic. The text descriptions consist of a simple variant of Backus-Naur Form (BNF) that includes the following symbols and conventions:

[ ]	선택 목록 (Brackets enclose optional items.)
{ }	1개만 선택(Braces enclose items only one of which is required.)
|	중괄호,대괄호 안에서 대체 (A vertical bar separates alternatives within brackets or braces.)
...	앞의 구문이 반복 (Ellipsis points show that the preceding syntactic element can be repeated.)
delimiters	Delimiters other than brackets, braces, vertical bars, and ellipses must be entered as shown.
boldface	굵게 표시된 단어는 키워드입니다. 표시된대로 입력해야합니다. 
               키워드는 일부 운영 체제에서 대소 문자를 구분하지만 일부 운영 체제에서는 대소 문자를 구분하지 않습니다. 
               굵은 체로 표시되지 않은 단어는 이름이나 값을 대체해야하는 자리 표시자입니다.

(Words appearing in boldface are keywords. They must be typed as shown. (Keywords are case-sensitive in some, but not all, operating systems.) Words that are not in boldface are placeholders for which you must substitute a name or value.)

참고 BNF 표기법

:=          정의를 의미하며 예시 <digit>:=0|1|2|3|4|5|6|7|8|9 
<>          순서를 유지해야 하는 표현은 <operator><operand>(<연산자><피연산자>) 처럼 순서대로 나열.

[<sign>] 생략할 수 있는 선택표기 <digit>+ <digit>을 최소 한 개 있어야 하고 반복가능 <mid expr>* <mid expr>이 없거나 반복해서 올 수 있음