Michael Hedgpeth
Michael Hedgpeth

Reputation: 7862

What datatype should be used for the Id primary key columns using a hilo generator and sql server?

If I am using a hilo generator with nhibernate, what should the datatype for my id column be? int or bigint?

Upvotes: 2

Views: 456

Answers (1)

Scot Hauder
Scot Hauder

Reputation: 246

What are the data requirements? If you need more than 2 billion rows, including deletes/rollbacks then go bigint EDIT: I suppose you could start the identity at -2 billion and get double your pleasure

Upvotes: 3

Related Questions