sql - Parsing MYSQL Insert statement -


i'm writing java tool parse sql queries in order table , columns details. parse select statement use mysql jdbc resultsetmetadata. :

 string query = "select * vendors";  preparedstatement pstmt = con.preparestatement(query);  resultsetmetadata meta = pstmt.getmetadata();  system.out.println(meta); 

but doesn't work insert/update statement.

does have solution that?

i tried various other solutions without success.

thanks

you can column name of table using resultssetmetadata this,

  resultsetmetadata rsmd=res.getmetadata();   int columncount=rsmd.getcolumncount();   (int = 1; i<= columncount; i++) {     columnheading=columnheading+"\t"+rsmd.getcolumnname(i);    system.out.println(columnheading); 

Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -