Dela via


Table.Keys

Syntax

 
Table.Keys(table as table) as list

Om

Returnerar nycklarna i den angivna tabellen.

Exempel 1

Hämta listan över nycklar för en tabell.

Användning

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

utdata

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