Try OpenEdge Now
skip to main content
Multi-tenancy Overview
Preface : Examples of SQL syntax diagrams
 

Examples of SQL syntax diagrams

In this example, GRANT, RESOURCE, DBA, and TO are keywords. You must specify RESOURCE, DBA, or both, and at least one user_name. Optionally you can specify additional user_name items; each subsequent user_name must be preceded by a comma:

Syntax

GRANT { RESOURCE, DBA } TO user_name[, user_name]... ;
This excerpt from an ODBC application invokes a stored procedure using the ODBC syntax { call procedure_name ( param ) }, where braces and parentheses are part of the language:

Syntax

proc1( param, "{ call proc2 (param) }", param);
In this example, you must specify a table_name, view_name, or synonym, but you can choose only one. In all SQL syntax, if you specify the optional owner_name qualifier, there must not be a space between the period separator and table_name, view_name, or synonym:

Syntax

CREATE [ PUBLIC ] SYNONYM synonym
  FOR [ owner_name.]{table_name|view_name|synonym} ;
In this example, you must specify table_name or view_name:

Syntax

DELETE FROM [owner_name.]{table_name|view_name}  
[ WHERE search_condition] ;
In this example, you must include one expression (expr) or column position (posn), and optionally you can specify the sort order as ascending (ASC) or descending (DESC). You can specify additional expressions or column positions for sorting within a sorted result set. The SQL engine orders the rows on the basis of the first expr or posn. If the values are the same, the second expr or posn is used in the ordering:

Syntax

ORDER BY {expr|posn}[ ASC | DESC ]
  [ , [{expr|posn}[ ASC | DESC ]]...]
* Long SQL syntax descriptions split across lines