• Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieve return message  RSS feed

 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing following simple SQL using JDBC. I need to retrieve the
return message "2 rows deleted". Could anyone tell me which
JDBC API I can use? Thanks.

SQL> delete from family_member where first_name='ann';

2 rows deleted.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36660
475
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jane,
If you call it using executeUpdate(), the method returns an integer (in your case 2.) Your code knows that it is performing a delete and can form an appropriate message.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!