20. Writing 4GL Statements : Database Access Statements : Using the Delete Statement
 
Share this page                  
Using the Delete Statement
The delete statement removes rows from a database table, based on the conditions specified in the where clause. If no condition is specified, the statement deletes all the rows in the table. The statement below deletes any row of the Personnel table that contains the same value in the empno column as in the form's field Empno.
delete from personnel where empno = :empno;
To remove values from a database table using a table field in this way, use the delete statement along with the unloadtable statement, as described in Processing an Entire Table Field or Array with Unloadtable and unloadtable Statement—Loop Through Rows and Execute Statements.