Tuesday, March 20, 2012

Primary key and identity

Can someone tell me the difference between making a column primary key column vs. making it identity column?

thanks

Identity just auto increments the value in that column (like autonumber in Access). A primary key uniquely identifies a specific row. Obviously you can have only one primary key per table (you can make a combination of columns the primary key - but I do not recommend this).

No comments:

Post a Comment