In most sql drivers.. you can always use executeQuery even if the query has no result set.
On Wednesday, September 15, 2021, Alessandro Solimando < alessandro.solima...@gmail.com> wrote: > Hi Igyu, > sending different SQL statements is exactly what beeline has to handle, > I'd have a look at how they handle this: > https://github.com/apache/hive/tree/master/beeline (this > <https://github.com/apache/hive/blob/c62f6e00f766e3cfe7c51c9072dfd8d606f82bcc/beeline/src/java/org/apache/hive/beeline/BeeLine.java#L1489> > seems a good starting point). > > HTH, > Alessandro > > On Wed, 15 Sept 2021 at 03:50, igyu <i...@21cn.com> wrote: > >> SQL is writed by user. >> user can write "show tables", "use db"or "select * from table". >> so I don't know SQL before send to server. >> when SQL into the server how can I know use execute or executeQuery. >> >> SQL type is too many >> >> ------------------------------ >> igyu >> > -- Sorry this was sent from mobile. Will do less grammar and spell check than usual.