表A:里面很多数据了,包含一些字段如(create_date等等)
create_date x
2014-03-30 00:01:00 x
2014-03-30 00:02:00 x
2014-03-30 00:03:00 x
2014-03-30 00:04:00 x
2014-03-30 00:05:00 x
......
我现在要多加一个字段,start_date
里面的数据想变成:
create_date start_date x
2014-03-30 00:01:00 2014-03-30 00:01:00 x
2014-03-30 00:02:00 2014-03-30 00:01:00 x
2014-03-30 00:03:00 2014-03-30 00:02:00 x
2014-03-30 00:04:00 2014-03-30 00:03:00 x
2014-03-30 00:05:00 2014-03-30 00:04:00 x
.....
有什么sql语句实现吗?
start_date 的时间其实是上一条记录的 create_date 的时间