sqlite auto incrementing index

I’m still working on organizing my music, and one thing I decided to do was to put everything in a tiny sqlite database instead of storing it all in XML and shifting arrays around (yuck).  I went to create an auto-incrementing index column in my tables though, and I couldn’t figure it out.

SQLite’s page on the matter says to use INTEGER PRIMARY KEY AUTOINCREMENT, though that order didn’t work for me.  What did work was INTEGER AUTOINCREMENT PRIMARY KEY.  Weird.

And for the record, SQLite is incredibly fast, assuming you are using transactions to insert, delete and update stuff.  Wow.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s