AcuODBC User's Guide
Version 6.0

5.3.5 DELETE Command

Use the SQL statement DELETE to delete one or more rows from a table.


    DELETE FROM <table-name>   
    [WHERE <condition>]   

This command deletes rows whose values satisfy the WHERE condition. The format of the WHERE clause is the same as it is in the SELECT command. If there is no WHERE clause, all rows are deleted. See section 5.3.1, "SELECT Command," for more information.

If the WHERE condition is included, but no rows satisfy the condition, the command does nothing, and it does not report an error.


    DELETE FROM pets   
    WHERE ANIMAL_TYPE = 'Bird'   

This statement deletes all the rows that have the column "animal_type" containing the value "Bird." The revised table looks similar to this:

Note: Be sure to include a WHERE clause in your statement. If you do not, all the rows of the table will be deleted. For example,


deletes all the rows in the table called "pets."

If a data source is designated as read-only and the data is linked, users cannot delete rows from the table or records from the data file. Read Only is the default setting. To enable users to delete rows from the table and records from the data file, clear the Read Only check box on the Advanced tab of the AcuODBC Configuration property sheet (or the AcuODBC Server Configuration property sheet if this is a remote DSN).

Acucorp, Inc.
Voice: (800) 262-6585 (U.S.A. and Canada)
Voice: (858) 689-4500
Fax: (858) 689-4550

Please share your comments on this manual
or on any Acucorp documentation with the
Acucorp Communications Department.
1988-2003 Acucorp, Inc.
All rights reserved.