Пређи на главни садржај

Table.AddKey

Dodaje ključ u tabelu.

Syntax

Table.AddKey(
table as table,
columns as list,
isPrimary as logical
) as table

Remarks

Dodaje ključ u tabelu table, gde je columns lista imena kolona koja definiše ključ, a isPrimary navodi da li je ključ primaran.

Examples

Example #1

Dodajte primarni ključ sa jednom kolonom u tabelu.

let
table = Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
}),
resultTable = Table.AddKey(table, {"Id"}, true)
in
resultTable

Result:

Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
})

Category

Table.Transformation