在設計數據庫的時候,把數據的跟新,刪除都是軟操作,就是都是變成了增加,也是會需要讀取最新的那條數據
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'