Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

getting at sequence previous/next values



Hello,

I've got a table that looks basically like:

	id_show         | serial
	show_name       | text 
	show_type       | text                        
	created_on      | timestamp without time zone 

When looking at a row with an id_show of value n, I'd like to have an 
easy way of knowing the preceding and next values of id_show in the 
sequence (which might have holes).

Is there some convenient way to get that info, or must I do a full-blown 
select?

Thanks,



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group