On Wed, Feb 16, 2011 at 12:33 AM, Simon Slavin <[email protected]> wrote:
> Or to put it another way, if a column is autoincrement and you don't intend 
> to mess with the values manually, it's going to be unique anyway, so it makes 
> a good simple short primary key.  You may have good reasons to make another 
> index on the combination of columns, though.

It's not about the real use case. I understand, that having such a
primary key probably doesn't make much sense. I'm asking if it is
technically possible to create a table like

create table foo (
  id integer not null autoincrement,
  another_id integer not null,
  primary key(id, another_id)
)


without Error: near "autoincrement": syntax error. I'm asking because
while using ORM I accidently wrote a code which was supposed to create
such a schema, but it didn't. I'm curious is it possible in SQLite.


-- 
Maciej Lotkowski
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to