我问过this question并想编辑它,但是StackOverflow出于某种原因不允许我编辑它。这是编辑过的版本
例如,查询:
create volatile table testTable as (select * from ... blah blah) ;
select top 10 * from testTable ;
drop table testTable ;它作为一个会话在sql辅助中执行完美。我确信可以在一个会话中在Java中执行它。
sql assistant目标:需要在一个类似于的会话中执行它,以便能够引用后续select语句中的易失性表。另外,select语句中的数据应该保存在ResultSet中。
PS我看到了一个关于mysql的https://stackoverflow.com/questions/21592224/how-to-get-resultset-from-executebatch的答案。诀窍是打开allow multiple queries String dbUrl =“jdbc:mysql://test?allowMultiQueries=true”;
发布于 2014-02-06 17:13:09
到底什么是失败?
是否有"testtable不存在“的错误消息?然后,程序在每次请求后关闭连接。
进行选择时,表是否为空?然后,忘记将提交保存行添加到创建中。
https://stackoverflow.com/questions/21605803
复制相似问题