o: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] Is this safe use of SELECT in an INSERT?
Graham Holden wrote:
> insert or ignore into Servers values ( 'MyServer', 12345, ( select
> count (*) from Servers ) )
>
> is the "count (*)" guaranteed t
Graham Holden wrote:
> insert or ignore into Servers values ('MyServer',12345,( select
> count (*) from Servers ) )
>
> is the "count (*)" guaranteed to be the count before the insert?
Yes. But if any row was ever deleted, that value might alread by used.
You could make serverIdx au
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 ) )
3 matches
Mail list logo