从rownum()= 3的表中删除

时间:2019-01-09 22:58:50

标签: database hsqldb

如何使用“ rownum”从任何表中删除第三行(我正在使用hsqldb) 我尝试许多查询,结果返回始终为0 例如这个->

SELECT ROW_NUMBER FROM

(SELECT ROWNUM() AS ROW_NUMBER, abs.* FROM absence abs)

WHERE ROW_NUMBER = 3;

1 个答案:

答案 0 :(得分:0)

您需要在DELETE语句的子查询中找到第三行。

例如

DELETE FROM customer WHERE id IN (SELECT id FROM customer ORDER BY id OFFSET 2 FETCH 1 ROW ONLY)