Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 564 Bytes

table-keys.md

File metadata and controls

37 lines (27 loc) · 564 Bytes
description title
Learn more about: Table.Keys
Table.Keys

Table.Keys

Syntax

 
Table.Keys(table as table) as list

About

Returns the keys of the specified table.

Example 1

Get the list of keys for a table.

Usage

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