提取下一行数据

最近更新时间: 2025-02-18 16:02:00

  • 复制
    复制成功
postgres=# DECLARE tbase_cur SCROLL CURSOR FOR SELECT * from tbase ORDER BY id; 
DECLARE CURSOR
postgres=# FETCH NEXT from tbase_cur ;               
 id |  nickname   
----+-------------
  1 | hello TDSQL PG
(1 row)
postgres=# FETCH NEXT from tbase_cur ;
 id | nickname  
----+-----------
  2 | TDSQL PG好
(1 row)