How to Create Auto Increment Primary Key on Sql

Just examine this script:


CREATE TABLE user (
user_id INT IDENTITY(1, 1) NOT NULL PRIMARY KEY,
user_name NVARCHAR(50)
)


Regarding IDENTITY(1, 1) and SQLCE Data Type, refer to the following article:

http://www.codeproject.com/KB/mobile/DBApplicationsForPocketPC.aspx
and
http://msdn.microsoft.com/en-us/library/aa237850%28SQL.80%29.aspx

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source

Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.

Explore NERV on GitHub →