Syntax Conventions

From InterBase
Jump to: navigation, search

The following table lists the conventions used in syntax statements and sample code, and provides examples of their use.

Convention Purpose Example
UPPERCASE

Keywords that must be types exactly as they appear when used.

SET TERM !!;
ADD [CONSTRAINT] CHECK

italic

User-supplied parameters that cannot be broken into smaller units

CREATE TRIGGER name FOR table;
ALTER EXCEPTION name 'message'

<italic>

Parameters in angle brackets can be broken into smaller syntactic units; the expansion syntax for these parameters follows the current syntax statement

WHILE (<condition>)
DO <compound_statement>33

[]

Optional syntax: you do not need to include anything that is enclosed in square brackets; when elements within these brackets are separated by the pipe symbol (|), you can choose only one

CREATE [UNIQUE][ASCENDING | DESCENDING]
[FILTER[FROM subtype] TO subtype]

{}

You must include one and only one of the enclosed options, which are separated by the pipe symbol (|)

{INTO | USING}

|

You can choose only one of a group whose elements are separated by this pipe symbol

SELECT|DISTINCT|ALL]

...

You can repeat the clause enclosed in brackets with the "..." symbol as many times as necessary

(<col>[,<col>...])


Reading and Typing Capitals

Type of entry Case Sensitivity
SQL Statements

When you’re entering SQL stat ements into IBConsole, you can ignore the capitalization. The conventions listed above are to make it easy to read and understand the examples. You can enter the exercises in all lower case if you prefer.

Strings

Strings (anything inside of quotation marks)are case sensitive. There are many strings in single quotes in this Quick Start, and you must enter the case exactly as it’s shown.

External
References

When you refer to something outside of InterBase, such as a filename,the reference is case sensitive.

Line Breaks

  • Line breaks are added within example statements to make them easy to read and understand. They are not required.
  • When you’re entering statements you don’t have to follow the line breaks in the examples. Enter ones that make it easy for you to keep track of what you’re doing. InterBase ignores line breaks within input SQL statements.

Advance To:

Understanding Which Parts to Do