11 SQL Statements for Flat-File Drivers : Delete Statement

Delete Statement
The Delete statement is used to delete rows from a database table. The form of the Delete statement supported for flat-file drivers is:
DELETE FROM table_name
[ WHERE { conditions | CURRENT OF cursor_name } ]
table_name can be a simple table name or a full path name. A table name is preferred for portability to other SQL data sources.
The Where clause determines which rows are to be deleted. If you include only the keyword Where, all rows in the table are deleted, but the file is left intact.
The Where Current Of cursor_name clause can be used only by developers coding directly to the ODBC API. It causes the row at which cursor_name is positioned to be deleted. This is called a "positioned delete." You must first execute a Select...For Update statement with a named cursor and fetch the row to be deleted.
An example of a Delete statement on the emp table is:
DELETE FROM emp WHERE emp_id = 'E10001'
Each Delete statement removes every record that meets the conditions in the Where clause. In this case, every record having the employee ID E10001 is deleted. Because employee IDs are unique in the employee table, at most, one record is deleted.