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  阅读(6938)  评论(0编辑  收藏  举报