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.
我正在将一个字段更改为唯一的,但目前某些帐户在该字段中具有相同的值。
如何计算当前有多少字段在该字段中具有非唯一值?
谢谢!
您可以运行 SOQL 聚合查询来查找不唯一的值,例如
select name from account group by name having count(name) > 1
[编辑] 您还可以计算每个值,例如,这将显示每个非唯一值有多少行。
select name, count(id) num from account group by name having count(name) > 1