On 9/22/08, Jay A. Kreibich <[EMAIL PROTECTED]> wrote: > On Mon, Sep 22, 2008 at 04:02:37PM -0600, Dennis Cote scratched on the wall: > > P Kishor wrote: > > > > How do I get the number of rows that were deleted by the above DELETE? > > > Do I first do a SELECT to find out the number of matches before doing > > > the DELETE? > > > > You don't need to the trigger fires for each row that is deleted, > > > ...unless the command is "DELETE FROM <table>;" with no WHERE clause. > In that case the table is truncated and no triggers are fired.
Thanks for the caveat. I will set the logic for that in the application to update the counts table manually. > > To avoid that, either manually clear the row-count for that table or > use "DELETE FROM <table> WHERE 1;". It will be much slower, but it > will delete the rows one at a time, calling the trigger on each one. > > -j > > > -- > Jay A. Kreibich < J A Y @ K R E I B I.C H > > > "Our opponent is an alien starship packed with atomic bombs. We have > a protractor." "I'll go home and see if I can scrounge up a ruler > and a piece of string." --from Anathem by Neal Stephenson > -- Puneet Kishor http://punkish.eidesis.org/ Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/ Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users