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]}