A.J.Millan wrote:
Does exist some method to erase records and to obtain the number of erased
records at the same time?
It is to say:
SELECT count() FROM someTable WHERE some-condition;
DELETE FROM someTable WHERE some-condition;
in only one statement?
Yes. See the documentation for PRAGMA count_changes at
http://www.sqlite.org/pragma.html.
SQLite version 3.3.12
Enter ".help" for instructions
sqlite> create table t (id integer primary key, b text);
sqlite> insert into t(b) values('one');
sqlite> insert into t(b) values('two');
sqlite> insert into t(b) values('three');
sqlite> pragma count_changes= 1;
sqlite> delete from t where b like 't%';
2
sqlite> select * from t;
1|one
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------