Show TOC

rs_deleteLocate this document in the navigation structure

Deletes a row in a replicated table.

Example 1

Changes the rs_delete function string for the <titles_rep> replication definition so that it executes a stored procedure named del_title.

alter function string titles_rep.rs_delete
 for sqlserver_derived_class
 output rpc
 'execute del_title
  • Replication Server executes rs_delete to delete a single row in a table. The row is identified by the primary key columns defined in a replication definition for the table.

  • rs_delete has replication definition scope.

  • Replication Server generates an rs_delete function string for the system-provided function-string classes when you create a replication definition.

  • If you use a user-created base function-string class, you must create an rs_delete function string for each replication definition.

  • Create or customize an rs_delete function string where you created the replication definition.

  • For the system-provided classes <rs_sqlserver_function_class> and <rs_default_function_class>, the rs_delete generated function string uses the Transact-SQL delete command syntax. The row to be deleted is identified with a where clause that specifies the pre-delete values, or before image, of the primary key columns.