refactor SQL.DELETE and SQL.INSERT