forum-msg-id-130188-edit

Original date:2016-08-19 15:29:24 Edited by: ghaberek Subject: Re: [OT] SQLite autoincrement vs primary keys / rowid

You have to combine columns into a single primary key: http://stackoverflow.com/questions/734689/sqlite-primary-key-on-multiple-columns

Edit 1: Scratch that. While this syntax technically works, it ignores the AUTOINCREMENT functionality on the id column. I'll do more research.

Edit 2: Do you just need to guarantee that a column is unique? Use the UNIQUE constraint instead: http://stackoverflow.com/questions/6154730/sqlite-multi-primary-key-on-a-table-one-of-them-is-auto-increment

-Greg

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu