Ask Your Question
0

How do I get index field to increment? [closed]

asked 2014-01-22 00:22:07 +0100

Rich2506 gravatar image

I was asked to add an index field to my database. No problem, though it would have been nice to have seen an indexing option before I finished creating the data elements. Can I somehow get the index field to automatically increment by one every time I add a new record? I currently have to do that manually and it would be kind of nice if there was a way for the database to do that automatically.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-18 17:34:26.429959

1 Answer

Sort by » oldest newest most voted
0

answered 2014-01-22 04:38:32 +0100

frofa gravatar image

updated 2014-01-22 04:39:17 +0100

Your database table needs an auto-value INTEGER column/field as primary key/index. See section 7 of this tutorial. (Did you not see this option when you created your table?)

edit flag offensive delete link more

Comments

1

Ah, many thanks! I did enter "Integer" as the format and saw the "auto-value" option, but wasn't clear on what that option did.

Rich2506 gravatar imageRich2506 ( 2014-01-22 05:03:09 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2014-01-22 00:22:07 +0100

Seen: 774 times

Last updated: Jan 22 '14