甲骨文:LONG RAW 到?
我正在用java编写一个程序,我需要创建一个表的副本(没有数据)。为此,我使用以下查询,
CREATE TABLE NEW_TABLE AS
SELECT * FROM OLD_TABLE
我遇到了一个表,其中一列的数据类型为LONG RAW,该类型已被废弃。
我尝试使用下面的查询,但它不起作用。 (ORA-01003:未解析任何语句 )
CREATE TABLE NEW_TABLE AS
SELECT ID, COL1, COL2, TO_LOB(COL3) FROM OLD_TABLE
有人可以告诉我一个简单的查询吗?它应该能够存储上一个表中的值。我正在使用 oracle 10g
提前致谢。
编辑:
抱歉,这是我的错误,上面的查询工作正常,但我调用的是 executeQuery
而不是 executeUpdate
I am writing a program in java where I need to create a copy of a table (without data). for that I am using the following query
CREATE TABLE NEW_TABLE AS
SELECT * FROM OLD_TABLE
I have come across a table where one of the columns has the data type LONG RAW which is depricated.
I tried using the query below but it did not work. (ORA-01003: no statement parsed
)
CREATE TABLE NEW_TABLE AS
SELECT ID, COL1, COL2, TO_LOB(COL3) FROM OLD_TABLE
Can someone tell me a simple query for this. It should be able to store the values from the previous table. I am using oracle 10g
Thanks in advance.
EDIT:
Sorry it was my mistake, the above query worked fine but I was calling executeQuery
instead of executeUpdate
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许此讨论会有所帮助。
Perhaps this discussion would help.
抱歉,这是我的错误,上面的查询工作正常,但我调用的是
executeQuery
而不是executeUpdate
,后者抛出了SQLException
Sorry it was my mistake, the above query worked fine but I was calling
executeQuery
instead ofexecuteUpdate
which was throwing anSQLException