Field label

Field descriptor

Variants:
1. f
2. dbtab~field
3. tabalias~field

Effect

Used in the SELECT, OPEN CURSOR, UPDATE and DELETE commands to uniquely identify columns (fields) of database tables and views specified in FROM clauses.

Effect

Identifies the field f of a database table or view specified in the FROM clause. The name f may only occur once in all database tables or views, that is, it must be unique . You use this variant particularly when there is only one table specified in the FROM clause. If the uniqueness of the field cannot be guaranteed, you must use variant 2 or 3.

Example

Output a list of all customers whose names begin with 'A':

TABLES SCUSTOM. 
 
SELECT * FROM SCUSTOM WHERE NAME LIKE 'A%'. 
  WRITE: / SCUSTOM-ID, SCUSTOM-NAME. 
ENDSELECT.

Effect

Identifies field f in the database table or view dbtab specified in the FROM clause. The combination dbtab~field must be unique. You can use this variant if table dbtab only appears once in the FROM clause. If this uniqueness cannot be assured, you must use variant 3.

Example

Output a list of all customers whose names begin with 'A':

TABLES SCUSTOM. 
 
SELECT * FROM SCUSTOM WHERE SCUSTOM~NAME LIKE 'A%'. 
  WRITE: / SCUSTOM-ID, SCUSTOM-NAME. 
ENDSELECT.

Effect

Identifies field f in the table or view with the alias name tabalias specified in the FROM clause.

Example

Output a list of all customers whose name begins with 'A':

TABLES SCUSTOM. 
 
SELECT * FROM SCUSTOM AS T WHERE T~NAME LIKE 'A%'. 
  WRITE: / SCUSTOM-ID, SCUSTOM-NAME. 
ENDSELECT.