For example when creating the table with T-SQL use the
IDENTITY
keyword for the proper column. Something like:
CREATE TABLE MyTable (
Col1 INT NOT NULL PRIMARY KEY,
Col2 VARCHAR(100),
Col3 BIGINT IDENTITY(1,1)
)
For more details, see:
CREATE TABLE[
^]
[Addition]
Just saw you other post and based on that I got the impression you're using a primary key with several other columns and this identity on alongside it. I would suggest to do it vice versa. Use this identity field as your primary key (both in the database and in the application) and have a unique key on the other columns.