I want to keep a semi-persistent list of server/port pairs with an associated 
"index" that can be used to refer to entries elsewhere. Given:
create table Servers (    serverName    text,    serverPort       integer,    
serverIdx         integer unique,    primary key ( serverName, serverPort ) )
Is the following "safe" to ensure that the next index value is used for 
inserted rows? (It seems to work fine from the shell).
insert or ignore into Servers values (    'MyServer',    12345,    ( select 
count (*) from Servers ) )
I.e. is the "count (*)" guaranteed to be the count before the insert?
Thanks.Graham Holden
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to