To add records to a database, use the CREATE statement which places a newly created record in the database. All fields in the record are set to the initial values specified in the schema. The CREATE statement causes any CREATE trigger associated with the table to execute. This trigger may set fields in the record to new values.

To delete records from a database, use the DELETE statement. The DELETE statement causes any DELETE trigger associated with the table to execute.

Use the ASSIGN statement or the Assignment (=) statement to update a database record. The ASSIGN statement does not actually write records to the database until the end of a transaction, after the record goes out of scope, or after an explicit RELEASE.

The following code creates a new record in the Customer table:

CREATE Customer.     // Create the record
Customer.Name = "myNewCustomer".     // Assign values to fields
Customer.Address = "123 Main St.".
RELEASE Customer.     // Release the record

FIND FIRST Customer WHERE Customer.Name = "myNewCustomer".
DISPLAY Customer.Name Customer.CustNum Customer.Address.
See also

Adding and deleting records