Getting duplicate count when executing INSERT IGNORE via JDBC
- by Nickolay Komar
Is it possible to get the duplicate count when executing MySQL "INSERT IGNORE" statement via JDBC?
For example, when I execute an INSERT IGNORE statement on the mysql command line, and there are duplicates I get something like
Query OK, 0 rows affected (0.02 sec)
Records: 1 Duplicates: 1 Warnings: 0
Note where it says "Duplicates: 1", indicating that there were duplicates that were ignored.
Is it possible to get the same information when executing the query via JDBC?
Thanks.