groovy select with metadata
Copy this code and paste it in your HTML
query = args[0]
sql
= Sql.
newInstance("jdbc:mysql://localhost:3306/mysql",
"root",
"",
"com.mysql.jdbc.Driver")sql.query(query){ rs ->
for(i
in 1..
meta.
columnCount){ print rs.
getObject(i
)?.
toString() }
}
}
Report this snippet
Comments
Subscribe to comments