Stepping/Paging Through Rows

Поиск
Список
Период
Сортировка
От Dan Parker
Тема Stepping/Paging Through Rows
Дата
Msg-id Pine.LNX.3.96.990222153316.1844C-100000@mis1.town.ipswich.ma.us
обсуждение исходный текст
Ответ на Re: your mail  ("Roderick A. Anderson" <raanders@altoplanos.net>)
Ответы Re: [SQL] Stepping/Paging Through Rows
Список pgsql-sql
Hi,

I've just started learning PostgreSQL (and SQL in general, really,
although I do have some experience with a proprietary RDBMS) and have been
wondering how I can page through records in a table or view.

I learned about cursors and they solved part of the problem - I created a
form with Perl/Tk with buttons to move forward a row and backwards a
row and that seems to be fine.

There are a couple of features I would like to have that I can't figure
out how I'd implement.  For example, lets say I want to add a new row to
the table.  I press an 'Add' button, the form goes blank, and I key in all
of the information.  I press an 'Update' button and behind the scenes
things whirl around and update the record in the database.  No problem.
But let's say now I want to return the user back to the browsing form and
place them on the row they just entered (while still being able to "page"
through the rows with the forward and back buttons).   I'm stuck. If I
create a new cursor, I'm back at the beginning of the table - there
doesn't seem to be a way to find a particular row and placing the
cursor there after creating the cursor.

Any help would be appreciated.  (I'd love a link to a good online SQL
resource.)

Dan


В списке pgsql-sql по дате отправления:

Предыдущее
От: Mauricio Carvalho de Oliveira
Дата:
Сообщение: Problem with HAVING clause
Следующее
От: "Brett W. McCoy"
Дата:
Сообщение: Re: [SQL] Stepping/Paging Through Rows