แชร์ผ่าน


Table.Keys

วากยสัมพันธ์

 
Table.Keys(table as table) as list

ประมาณ

ส่งกลับคีย์ของตารางที่ระบุ

ตัวอย่างที่ 1

รับรายการคีย์สําหรับตาราง

การใช้งาน

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