Page 1 of 1

SQLite - More questions

Posted: Fri 16 Jul 2010 13:30
by chkaufmann
Doesn't SQLite have sequences or generators? I get an error with this command:

create sequence MyUniqueId start with 1;

and how to retreive a value? Like this?

select MyUniqueId.nextval from dual;


And what is the maximum number of elements allowed for the "IN" operator?

cu Christian

Posted: Mon 19 Jul 2010 09:38
by bork
Hello

SQLite doesn't have sequences. But it has auto-increment fields. If table has an auto-increment field then you can get the current value of the auto-increment field using the following query:

Code: Select all

  select seq from sqlite_sequence where name='table_name'
You can find more detailed information here: http://www.sqlite.org/autoinc.html

I cannot find any information about maximum number of elements allowed for the "IN" operator in the SQLite documentation. If you need this information you should ask the SQLite support: http://www.sqlite.org/support.html