Monika Arora

Monika Arora

  • NA
  • 631
  • 420.6k

Rollback and Fail algorithm not working in SQLite

Nov 30 2011 5:24 AM
I m working on SQLite 3 command window. When I execute Rollback command it don't work correctly. I m using ON CONFLICT clause with ROLLBACK command. I provide NOT NULL constraint and provide NULL value in UPDATE statement. Before that I have updated same row with different value. Like I updated 3 rd row whose value was 3 with 6 and then update this value to NULL. According to Rollback it should delete value 6 which I have previously updated. Now in Fail algorithm I have updated first 2 rows with 5 and 6 value. Their previous values were 1 and 2. I have inserted Null value in 3 rd row. And after that I update 4th row with 8. Now according to Fail algorithm,it should convert the first and second rows to their previous values. But its not happening. I have even tried that may be 4th row value is changed to previous value. Even I have tried to insert 1st,2nd,3rd nad 4th rows after the Null value row updation. I m using the following syntax:-
create emp(name text,code int NOT NULL ON CONFLICT FAIL/ROLLBACK); . Please help. Thanks. 

Answers (2)