Was this helpful?
Update_rowcount Option
The set update_rowcount statement specifies the nature of the value returned by the inquire_ingres(rowcount) statement. Valid options are:
Changed
Inquire_ingres(rowcount) returns the number of rows changed by the last query.
Qualified
Inquire_ingres(rowcount) returns the number of rows that qualified for change by the last query.
Qualified is the default setting, for example, for the following table:
column1
column2
column3
Jones
000
green
Smith
000
green
Smith
000
green
and for the following query:
replace test_table (column1 = "Jones") 
  where column2 = 000 and column3 = "green";
The DBMS Server, for reasons of efficiency, does not actually update the first row, because its "column1" already contains "Jones." However, the row does qualify for updating by the query. For the preceding query, if the update_rowcount option is set to changed, inquire_ingres(rowcount) returns 2 (the number of rows actually changed), but if the update_rowcount option is set to qualified, inquire_ingres(rowcount) returns 3 (the number of rows that qualified to be changed).
To determine the setting for the update_rowcount option, issue the retrieve (dbmsinfo(x='update_rowcnt')) statement.
Last modified date: 08/28/2024