作者killer0720 (好冷)
看板Database
标题Re: [SQL ] 取出的资料存到暂存table
时间Tue Dec 11 01:22:50 2007
※ 引述《PsMonkey (痞子军团团长)》之铭言:
: ※ 引述《killer0720 (好冷)》之铭言:
: : 请问一下
: : 我现在想要从A栏位中
: : 选出哪个资料的值是大於三十
: : 并且
: : 暂存到暂存TABLE T1
: : 要怎麽写
: : 我是写在JAVA 中
: : ResultSet result = stmt.executeQuery( "CREATE T1 AS SELECT A FROM TABLE1
: : WHERE (a>30) " );
: : 他的ERROR 是
: : java.sql.SQLException: Can not issue data manipulation statements with
: : executeQuery().
: : 谢谢
: ==.===
: 这好像是 Java 问题,不是 DB 问题
: 我是没有实测,不过,像这种指令应该不是用 executeQuery()
: 而是用 execute 吧?
改成EXECUTE的话
result 就要改成boolean compile 才会过
那我就不能把t1给印出来啦 = =
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.130.60.223