3.2、提取下一行数据

  1. postgres=# DECLARE tbase_cur SCROLL CURSOR FOR SELECT * from tbase ORDER BY id;
  2. DECLARE CURSOR
  3. postgres=# FETCH NEXT from tbase_cur ;
  4. id | nickname
  5. ----+-------------
  6. 1 | hello TBase
  7. (1 row)
  8. postgres=# FETCH NEXT from tbase_cur ;
  9. id | nickname
  10. ----+-----------
  11. 2 | TBase
  12. (1 row)