My problem is that triggers don't trigger until after commit.
On Thu, Apr 17, 2008 at 4:52 PM, Dennis Cote <[EMAIL PROTECTED]> wrote:
> Alex Katebi wrote:
> > I will give a simple example:
> >
> > create table t1(name);
> > insert into t1('Alex');
> > begin;
> > insert into t1 values ('Dennis');
> > select * from t1;
> >
> > How can I see only the 'Dennis' row in this simple example.
> >
>
> As I said before, use a trigger to keep track of the changes.
>
> create table t1(name);
> insert into t1('Alex');
>
> create table change_log (id integer primary key);
>
> create trigger in_t1 after insert on t1
> begin
> insert into change_log values(new.rowid);
> end;
>
> delete from change_log;
> begin;
> insert into t1 values ('Dennis');
> select * from t1 where rowid in (select id from change_log);
>
> Now either commit or rollback to end your transaction.
>
> Dennis Cote
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users