INSERT SQL Command
Appends a new record to the end of a table and fills corresponding fields with specified values. The syntaxes:
VALUES (Expression1 [, Expression2, ...])
Use this syntax to simple insert the values into specified fields in a table.
SELECT SELECTClauses [UNION UnionClause SELECT SELECTClauses ...]
Use this syntax to insert rows from a nested SQL SELECT command.
Specifies the name of the DBF file for appending a new row. If dbf_filename contains file name only (without path), this DBF file is being looked at the same directory, from where the last DBF file was opened.
If the table hasn't been opened, DBF Commander opens the file automatically. It remains open after the query is complete.
Specifies the field names of the new record into which the values are inserted.
Specifies the values to be inserted into the fields of the new record. If you omit the field names, you must specify the field values in the order defined by the table structure. Use the table alias if the Expression is a name of a field.
For insertion into DBF table this variant of syntax retrieves data from specified fields of another DBF file, using one or more SQL SELECT statements.
Insert one record into "orders" DBF table:
In the example below, at first the SELECT statement selects values for the last month from "country" field of "customer" DBF file. Then the result values are inserted into "orders" table: