แชร์ผ่าน


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