查询“最高”行键

发布于 2024-12-28 23:41:05 字数 84 浏览 5 评论 0原文

我使用 RowKey,它是一个数字(作为字符串)。 如何通过查询获得最大的数字(RowKey)?

不支持最大运算符。但还有另一种可能吗?

I use a RowKey which is a number (as string).
How can I get the highest number (RowKey) with a query ?

Max operator is not supported. But is there another possibility ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖公主 2025-01-04 23:41:05

表中的所有条目均按 PartitionKey 排序,然后按 RowKey 排序。因此,最大的数字应该始终是最后一项(如果您对所有条目使用相同的 PartitionKey)。
您也可以使用 .ToList() 获取所有数据,然后调用 .Max() 方法。但如果您有大量条目,此方法可能效率低下且缓慢。

All entries in table are ordered by PartitionKey and then by RowKey. So your highest number should always be the last item (if you are using the same PartitionKey for all entries).
Also you can you can get all data by using .ToList() and then call .Max() method. But this method could be inefficient and slow if you got lots of entries.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文