Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
andre
Constraint Violating Yak Guru
259 Posts |
Posted - 2001-07-03 : 12:46:12
|
| I have a web page that displays a JPG image and has links to view the next and previous images. Let's say I also have a table like this:ID Filename---------------1 img001.jpg2 img002.jpg3 img003.jpgand the page uses this query: SELECT Filename FROM tblImage WHERE ID=2Can I get the next and previous ID and get this result using SQL?:Filename: img002.jpg Previous ID: 1 Next ID: 3 |
|
|
|
|
|