A表
today
2006-1-1
2006-1-2
2006-10-1
2006-10-2
2006-5-1
根据A表中的数据写一条sql语句查询出如下结果:
today              nextday
2006-1-1       2006-1-2
2006-10-1     2006-10-2
简单的题目都把我难倒,痛苦。。。
下面是QQ朋友帮我想的办法:
解决办法:1。select  a.today as today ,b.today as nextdate from A a join A b on b.today -a.today =1
                    2。select a.today,b.today as nextdate from A a,A b where a.today=b.today-1
posted on 2006-12-14 20:43 pear 阅读(384) 评论(0)  编辑  收藏 所属分类: 技术

只有注册用户登录后才能发表评论。


网站导航: