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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -