To delete a record in a database table, please do the following.
-
Add the following code to your script.
sqlQuery =” DELETE FROM Persons WHERE LastName='GuiXT' AND FirstName='Synactive'"
-
Add an exec statement as shown in the following example:
db.exec(sqlQuery);
-
The database entry for 'Synactive GuiXT' is now deleted from the 'Persons' table in the database.