开发者

Hsqldb rownum in UPDATE statement

Hallo, I've a problem with this query :

update EXAMPLETABLE set FLAG = 1 wher开发者_如何学Pythone FLAG = 0 and rownum < 10;

This query is working in Oracle (it updates exactly 9 rows), but not in my testcase with hsqldb (the statement updates ALL the rows in EXAMPLETABLE).

I'm using also SET DATABASE SQL SYNTAX ORA TRUE; in hsqlDb generation script. I'm using hsqlDb in-memory only.

Is this feature not implemented in hsqlDb?

Thanks, Roberto


This feature is not implemented in HSQLDB. It may be supported in ORACLE mode in the near future. (update: now supported in 2.2.6 and later versions).

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜