Solved

How to create table with auto increament field

Posted on 2000-03-27
4
198 Views
Last Modified: 2012-08-13
How to create table with auto increament field like in MS-Acccess

  Dewi
0
Comment
Question by:Dewi
  • 2
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
crsankar earned 50 total points
Comment Utility
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
 
LVL 10

Expert Comment

by:caraf_g
Comment Utility
What type of database is it? Is it an MS-Access database or another one?

Some databases do not support auto-increment fields.
0
 
LVL 6

Expert Comment

by:crsankar
Comment Utility
Since it is posted in the sql-server section I am assuming that you are talking about a sql server database.
0
 
LVL 10

Expert Comment

by:caraf_g
Comment Utility
<doh>
Sorry, I came into this question after a redirection from elsewhere. I wasn't aware it was in the SQL server area....
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now