How to create table with auto increament field

How to create table with auto increament field like in MS-Acccess

  Dewi
DewiAsked:
Who is Participating?
 
crsankarConnect With a Mentor Commented:
create table abc
(col1 numeric identity(1,1))

Note that when you use identity the column should not allow decimal values

idenity(seed,increment)

where seed is the starting value
increment is how much to increment by each time
0
 
caraf_gCommented:
What type of database is it? Is it an MS-Access database or another one?

Some databases do not support auto-increment fields.
0
 
crsankarCommented:
Since it is posted in the sql-server section I am assuming that you are talking about a sql server database.
0
 
caraf_gCommented:
<doh>
Sorry, I came into this question after a redirection from elsewhere. I wasn't aware it was in the SQL server area....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.