Bagikan melalui


Table.Keys

Sintaksis

 
Table.Keys(table as table) as list

Tentang

Mengembalikan kunci tabel yang ditentukan.

Contoh 1

Dapatkan daftar kunci untuk tabel.

Penggunaan

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

Output

{[Columns = {"Id"}, Primary = true]}