zhaoyinghuan <brightgre...@hotmail.com> wrote: > I think sqlite can automatically do commit or rollback when sql > statments(insert,update,or delete) are finished. > Is it correct? Or it must use "Begin transation"? > Anybody can give me some examples?
You can start an explicit transaction by running BEGIN [TRANSACTION] statement. If you do, you would then need to explicitly commit it (with COMMIT or END statement) or roll it back (with ROLLBACK statement). All statements that run between BEGIN and COMMIT/ROLLBACK belong to this transaction. If you don't start an explicit transaction, then every statement you run automatically starts one at the beginning, and commits at the end. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users