Table.Keys
Table.Keys(table as table) as list
返回指定表的键。
获取表的键列表。
使用情况
let
table = Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
}),
tableWithKeys = Table.AddKey(table, {"Id"}, true),
keys = Table.Keys(tableWithKeys)
in
keys
输出
{[Columns = {"Id"}, Primary = true]}