Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
此屏幕截图是 Sharepoint 数据库中的列表。
我想从数据库中获取数据,但我有版本问题;
tp_ID 是我的列表项 ID tp_Version 是我的列表版本
我想从数据中获取更高版本的 tp_ID。
谢谢你。
这将给你你所需要的:
select * from (select *,RANK () OVER ( PARTITION BY tp_id ORDER BY tp_version DESC) AS rnk from yourtable ) mytable where rnk <= 1