Partilhar via


SELECT Command

Activates the specified work area.

SELECT nWorkArea | cTableAlias

Parameters

  • nWorkArea
    Specifies a work area to activate. If nWorkArea is 0, the lowest-numbered unused work area is activated.
  • cTableAlias
    Specifies a work area containing an open table to activate. cTableAlias is the alias of the open table. You can also include a letter from A through J for cTableAlias to activate one of the first ten work areas.

Remarks

By default, work area number 1 is active when you start Visual FoxPro.

Note   Fields in tables open in any work area can be included in Visual FoxPro commands and functions. Use the following formats to access fields in a table open in a work area other than the current one: alias.field or alias->field.

Example

The following example demonstrates ways of selecting work areas.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
SELECT 1     && Work area 1
USE customer  && Opens Customer table

SELECT 2     && Work area 2
USE orders  && Opens Orders table

SELECT customer     && Work area 1
BROWSE

SELECT B     && Work area 2
BROWSE

See Also

ALIAS( ) | SELECT( ) | USE