会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
NetGao
专注.Net技术.....
首页
新随笔
管理
随笔分类 -
SQL SERVER
SQL查询当前数据上一条和下一条的记录
摘要:id是指当前数据news_id参数方法一:stringpreSql = "select top 1 * from news where news_id< "+id+" order by news_idDESC"stringnextSql = "select top 1 * from news where news_id> "+id+" order by news_idASC"方法二:s...
阅读全文
posted @
2010-08-07 03:21
NetGao
阅读(3185)
评论(1)
推荐(1)
公告