JavaScript Editor js editor     Web development 



Main Page

Returns the table alias of the current or specified work area.

ALIAS([nWorkArea | cTableAlias])

Parameters

nWorkArea


Specifies the work area number for which ALIAS(В ) returns the table alias.
cTableAlias


Specifies the table alias for which ALIAS(В ) returns the table alias. If you omit nWorkArea or cTableAlias, ALIAS(В ) returns the alias of the table open in the current work area. An empty string is returned if a table isn't open in the current or specified work area.

Return Value

Character

Example

The following example opens the customer table and displays its alias. The customer table is opened again in another work area, is assigned an alias of MyCustomer, and the alias is displayed.

В Copy Code
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer     && Open customer table
CLEAR
? ALIAS( )  && Display the alias
SELECT 0
USE customer AGAIN ALIAS MyCustomer  && Different alias
? ALIAS( )  && Display the alias

See Also



JavaScript Editor js editor     Web development