Select Statement
You use a SQL Select statement to specify the columns and records to be read. All of the Select statement clauses described in "SQL for Flat-File Drivers" in the DataDirect Connect for ODBC and Connect XE for ODBC Reference are supported by dBASE Select statements. This section describes the information that is specific to dBASE, which is Rowid.
Rowid Pseudo-Column
Each dBASE record contains a special column named Rowid. This field contains a unique number that indicates the record's sequence in the database. For example, a table that contains 50 records has Rowid values from 1 to 50 (if no records are marked deleted). You can use Rowid in Where and Select clauses.
Rowid is particularly useful when you are updating records. You can retrieve the Rowid of the records in the database along with the other field values. For example:
Then, you can use the Rowid of the record that you want to update to ensure that you are updating the correct record and no other. For example:
The fastest way of updating a single row is to use a Where clause with the Rowid. You cannot update the Rowid column.
Select statements that use the Rowid pseudo-column in the Where clause achieve maximum performance only for exact equality matches. If you use range scans instead of exact equality matches, a full table scan is performed. For example: