Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I use JDBC to execute database command?

 
sam cheung
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can someone please tell me if I use JDBC to execute database (non-query) command? For example, in MySQL, it has command like 'SHOW MASTER STATUS', Can I execute that thru JDBC? If yes, can you please point me to an example?

Thank you for any help.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35266
383
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam,
JDBC is used to execute queries (or DDL instructions.) You could use Runtime.exec() to call a shell script containing the database instruction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic