如何获取SurrealDB选择查询的总行数?

huangapple go评论80阅读模式
英文:

How do you get the total row count of a surrealdb select query?

问题

使用 SurrealDB,我可以像在传统 SQL 数据库中一样,通过以下方式获取查询的总记录数:

select count(*) from person
英文:

Using SurrealDB. is there a way that I can get the total amount of records for a query, like you would do in traditional SQL databases?

select count(*) from person

</details>


# 答案1
**得分**: 1

是的,它会是

    SELECT count() FROM person GROUP BY count

更多信息请查看这里:https://surrealdb.com/docs/surrealql/functions/count

<details>
<summary>英文:</summary>

Yes, it would be

    SELECT count() FROM person GROUP BY count

See more here: https://surrealdb.com/docs/surrealql/functions/count

</details>



huangapple
  • 本文由 发表于 2023年6月12日 06:23:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76452742.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定