Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: None  |  size: 0.29 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. show create table in java
  2. Statement stmt = conn.createStatement();
  3. ResultSet rs = stmt.executeQuery("show create table BLA.MY_TABLE");
  4. if(rs.next()) {
  5.        System.out.println("Table Name: "+rs.getString(1));
  6.        System.out.println("SQL Code: "+rs.getString(2));
  7. }
  8. rs.close();
  9. stmt.close();