# PrimaryKey

inner class PrimaryKey(val columns: Array<Column<*>>, name: String? = null)

Represents a primary key composed by the specified columns, and with the specified name. If no name is specified, the table name with the "pk_" prefix will be used instead.

#### Samples

org.jetbrains.exposed.sql.tests.demo.sql.Users

## Constructors

PrimaryKey
Link copied to clipboard
constructor(firstColumn: Column<*>, vararg columns: Column<*>, name: String? = null)
constructor(columns: Array<Column<*>>, name: String? = null)

## Properties

columns
Link copied to clipboard
val columns: Array<Column<*>>

Returns the columns that compose the primary key.

name
Link copied to clipboard
val name: String

Returns the name of the primary key.