masonlu

在设计数据库的时候,把数据的跟新,删除都是软操作,就是都是变成了增加,也是会需要读取最新的那条数据

SELECT * FROM SortInfo WHERE SnStart=\'11809180050063\' 

获取最新时间的数据

Select a.* FROM SortInfo a,(SELECT SnStart,Max(CreateDate) as MaxDateTime FROM SortInfo group by SnStart) b
  where a.SnStart=b.SnStart
  and a.CreateDate=b.MaxDateTime
  And a.SnStart=\'11809180050063\'

 

posted on 2018-09-06 18:53  Masonlu  阅读(6639)  评论(0编辑  收藏  举报

分类:

技术点:

相关文章:

  • 2022-02-11
  • 2022-12-23
  • 2021-10-17
  • 2021-09-21
  • 2022-12-23
  • 2021-12-17
  • 2021-07-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
相关资源
相似解决方案