Updating data in data source objects
To update data into data sources, use the nicknames for the data source objects in the UPDATE statement.
Before you begin
To update 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 UPDATE privilege on the nickname (for the federated database to accept the request)
- The user ID at the data source must have the UPDATE 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 UPDATE operations with some data sources, see Federated system INSERT, UPDATE, and DELETE restrictions.
To update data into data source objects, issue the UPDATE statement.
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 updates a row of information in the Informix table:
UPDATE db2user1.infx_table_nn SET c2='Bill' WHERE c1=2