Deleting data from data source objects

To delete data from data sources, use the nicknames for the data source objects in the DELETE statement.

Before you begin

To delete data using a nickname, all of the following privileges must be true:
  • The privileges held by the authorization ID of the statement must include the DELETE privilege on the nickname (for the federated database to accept the request)
  • The user ID at the data source must have the DELETE privilege on the underlying table object (for the data source to accept the request)
  • The user ID at the data source must be mapped to the authorization ID at the federated server through a user mapping.

About this task

Restrictions

Federation does not support DELETE operations with some data sources, see Federated system INSERT, UPDATE, and DELETE restrictions.

Procedure

Issue the DELETE statement to delete data from data source objects.

Example

An Informix® table consists of two columns. The first column contains INTEGER data and the second column contains VARCHAR data (up to 20 characters). The nickname infx_table_nn is registered with the federated server for the Informix table.

You can issue INSERT, UPDATE, and DELETE statements on the Informix table using the infx_table_nn nickname. The following statement deletes a row of information in the Informix table:
DELETE FROM infx_table_nn WHERE c1=3