Database Commands and Statements
Add a new record to current database file.
APPEND BLANK
Import records from a (.dbf) or ASCII file
APPEND FROM <xcFile>
[FIELDS <idField list>]
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
[SDF | DELIMITED [WITH BLANK | <xcDelimiter>] |
[VIA <xcDriver>]]
Average numeric expressions in the current work area
AVERAGE <nExp list> TO <idVar list>
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
Close files and release public and private variables.
CLEAR ALL
Close a specific set of files
CLOSE [<idAlias> | ALL | ALTERNATE | DATABASES | FORMAT |INDEXES ]
Perform a solid-disk write for all active work areas
COMMIT
Resume a pending LOCATE
CONTINUE
Copy the current (.dbf) structure to a new (.dbf) file
COPY STRUCTURE [FIELDS <idField list>] TO <xcDatabase>
Copy field definitions to a (.dbf) file
COPY STRUCTURE EXTENDED TO <xcExtendedDatabase>
Export records to a new (.dbf) or ASCII file
COPY [FIELDS <idField list>] TO <xcFile>
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
[SDF | DELIMITED [WITH BLANK | <xcDelimiter>] |
[VIA <xcDriver>]]
Tally records to a variable
COUNT TO <idVar>
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
Create an empty structure extended (.dbf) file
CREATE <xcExtendedDatabase>
Create a new (.dbf) file from a structure extended file
CREATE <xcDatabase>
FROM <xcExtendedDatabase>
[NEW]
[ALIAS <xcAlias>]
[VIA <cDriver>]
Mark records for deletion
DELETE [<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
FIELD :
Declare database field names
FIELD <idField list> [IN <idAlias>]
Search an index for a specified key value
FIND <xcSearchString>
Move the record pointer to a specific record
GO[TO] <nRecord> | BOTTOM | TOP
Merge two (.dbf) files to create a new (.dbf) file
JOIN WITH <xcAlias> TO <xcDatabase>
FOR <lCondition>
[FIELDS <idField list>]
Search sequentially for a record matching a condition
LOCATE [<scope>]
FOR <lCondition>
[WHILE <lCondition>]
Remove deleted records from a database file
PACK
Restore records marked for deletion
RECALL [<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
Assign new values to field variables
REPLACE <idField> WITH <exp>
[, <idField2> WITH <exp2>...]
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
Search an index for a specified key value
SEEK <expSearch>
Change the current work area
SELECT <xnWorkArea> | <idAlias>
Toggle filtering of deleted records
SET DELETED on | OFF | <xlToggle>
Establish shared or exclusive USE of database files
SET EXCLUSIVE ON | off | <xlToggle>
Hide records not meeting a condition
SET FILTER TO [<lCondition>]
Change the block size for memo files
SET MEMOBLOCK TO <nSize>
SET PATH :
Specify the search path for opening files
SET PATH TO [<xcPathspec list>]
Relate two work areas by a key value or record number
SET RELATION TO [<expKey> | <nRecord> INTO <xcAlias>]
[, [TO] <expKey2> | <nRecord2> INTO <xcAlias2>...]
[ADDITIVE]
Toggle relative SEEKing
SET SOFTSEEK on | OFF | <xlToggle>
Toggle the inclusion of nonunique keys into an index
SET UNIQUE on | OFF | <xlToggle>
Move the record pointer to a new position
SKIP [<nRecords>] [ALIAS <idAlias> | <nWorkArea>]
Copy to a (.dbf) file in sorted order
SORT TO <xcDatabase> ON <idField> [/[A | D][C]]
[, <idField2> [/[A | D][C]]...]
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
Sum numeric expressions to variables
SUM <nExp list> TO <idVar list>
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
Summarize records by key value to a (.dbf) file
TOTAL ON <expKey> FIELDS <idField list>
TO <xcDatabase>
[<scope>]
[WHILE <lCondition>]
[FOR <lCondition>]
UNLOCK :
Release file/record locks set by the current user
UNLOCK [ALL]
UPDATE :
Update current database file from another database file
UPDATE FROM <xcAlias>
ON <expKey> [RANDOM]
REPLACE <idField> WITH <exp>
[, <idField2> WITH <exp2>...]
Open an existing (.dbf) and its associated files
USE [<xcDatabase>
[INDEX <xcIndex list>]
[ALIAS <xcAlias>]
[EXCLUSIVE | SHARED]
[NEW] [READONLY]
[VIA <cDriver>]]
Remove all records from the current database file
ZAP