# Function primaryKey

- primaryKey<
  TTableName extends string,
  TColumn extends AnySQLiteColumn<{ tableName: TTableName }>,
  TColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],
  >(
  config: { columns: [TColumn, ...TColumns[]]; name?: string },
  ): PrimaryKeyBuilder

  #### Type Parameters

  - TTableName extends string
  - TColumn extends AnySQLiteColumn<{ tableName: TTableName }>
  - TColumns extends AnySQLiteColumn<{ tableName: TTableName }>[]

  #### Parameters

  - config: { columns: [TColumn, ...TColumns[]]; name?: string }

  #### Returns PrimaryKeyBuilder

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/primary-keys.d.ts:4
- primaryKey<
  TTableName extends string,
  TColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],
  >(
  ...columns: TColumns,
  ): PrimaryKeyBuilder

  @deprecated: Please use primaryKey({ columns: [] }) instead of this function

  #### Type Parameters

  - TTableName extends string
  - TColumns extends AnySQLiteColumn<{ tableName: TTableName }>[]

  #### Parameters

  - ...columns: TColumns

  #### Returns PrimaryKeyBuilder

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/primary-keys.d.ts:16