Deleting Data Using SQL Statements

From InterBase
Jump to: navigation, search

The executeUpdate() statement with a SQL DELETE string parameter deletes an existing row using the following syntax:

DELETE FROM table_name WHERE condition;

The following example deletes the entire “Sara Zabrinski” row from the EMPLOYEE table:

int rowCount = statement.executeUpdate
("DELETE FROM emp_table WHERE emp_no = 13314");