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 阅读(222) 评论(0)  编辑  收藏 所属分类: 技术



标题  
姓名  
主页
验证码 *  
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
 
 
相关链接:
网站导航: