Delete-SQL
This is the "other DELETE." Like the Xbase DELETE, it lets you mark one or more records in a table for deletion. The records aren't physically deleted until you PACK the table.| Usage | DELETE FROM [ Database! ] Table [ WHERE lCondition ] |
| Parameter | Value | Meaning |
| Database | Name | Name of database containing the table from which records are to be deleted. |
| Omitted | Delete records from a free table or the named table in the current database. | |
| Table | Name | Table from which to delete records. |
| lCondition | Logical | Determines which records are deleted. |
| Omitted | All records in cTable are deleted. |
| Example | * Delete all orders for a specified customer. DELETE FROM TasTrade!Orders WHERE customer_id="WOLZA" * Delete all orders for the current customer record. * Assumes Customer is open DELETE FROM TasTrade!Orders ; WHERE Customer_id=Customer.Customer_id * Get rid of customers who've never bothered to place an order. DELETE FROM TasTrade!Customer ; WHERE Customer_id NOT IN ; (SELECT Customer_ID FROM Orders) |
| See Also | Delete, Deleted(), Recall, Sys(3054) |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.