title: How to select 'previous' and 'next' records in SQL?
body: <p>I am building a blog-post detail page on my site that will display display a '<strong>previous</strong>' and '<strong>next</strong>' link similar to how a typepad blog post works. See example below.
  <img src="https://content.screencast.com/users/jessegavin/folders/Jing/media/09475b53-8d72-4d8f-8c27-8b959d6be9b0/2010-05-10_1315.png" alt="alt text"></p>
  
  <p>I am wondering if there is a way to query the database which accomplishes something like the image below where it selects the 'current' record (in yellow) for display, but also selects the next and previous records (in green) when sorted by PublishDate.</p>
  
  <p><img src="https://content.screencast.com/users/jessegavin/folders/Jing/media/57728c35-d459-4eed-9b05-a2877fa80cf7/2010-05-10_1323.png" alt="alt text"></p>
  
  <p>Also, for clarification, the database table I am working with has unique publish dates. Sorry that the example image shows multiple records with the same PublishDate.</p>