0

你好,我对这个查询有疑问:

更新EXAMPLETABLE set FLAG = 1 where FLAG = 0 and rownum < 10;

此查询在 Oracle 中有效(它恰好更新 9 行),但在我的 hsqldb 测试用例中无效(该语句更新了EXAMPLETABLE 中的所有行)。

我也在使用 SET DATABASE SQL SYNTAX ORA TRUE; 在 hsqlDb 生成脚本中。我只在内存中使用 hsqlDb。

这个功能在 hsqlDb 中没有实现吗?

谢谢,罗伯托

4

1 回答 1

0

这个特性在 HSQLDB 中没有实现。在不久的将来,它可能会在 ORACLE 模式下得到支持。(更新:现在支持 2.2.6 及更高版本)。

There is a problem in principle about this type of statement. As the rows could be returned in any order, an update is performed on an almost arbitrary subset of rows with the given FLAG setting.

于 2011-07-13T10:26:33.110 回答