postgresql - Postgres - indication for no rows updated -
I am running a simple update query, something like this:
some_table STT column updates Do = 'value' where column B = 'other value' There is no way to generate an error in any posts or to print a message when no rows are updated?
In the database, this is only possible if someone is updating from a stored procedure. In plpgsql:
BEGIN Update some temporary STT columns A = 'value' where column B = 'other value' 'Nothing unchanged' to take exception; end if; END Values are not logged though, but the command has been canceled. If you want to log it out, use Use alert instead, and set postgresql logging to include the warning. If you use the API to access PostgreSQL, then you usually update the number of one function values in Java.
Execute SQL executes executeUpdate ():
Public execute executeUpdate (string SQL) throws SQLException statement, which is a INSERT, UPDATE, or Delete statement or a SQL statement may not return anything, such as SQL DDL State Ment.
Parameter: SQL - A SQL INSERT returns no returns Returns: Statements Update or delete line calculation or SQL statement for which nothing returns throws: SQLException - If any database access An error occurs or the generated SQL statement generates a ResultSet object
Comments
Post a Comment