OLD | NEW |
1 # 2001 September 15 | 1 # 2001 September 15 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 INSERT INTO t5 VALUES(5, 6); | 382 INSERT INTO t5 VALUES(5, 6); |
383 } | 383 } |
384 set res [list] | 384 set res [list] |
385 db eval { SELECT t5.rowid AS r, c, d FROM t5, t6 ORDER BY a } { | 385 db eval { SELECT t5.rowid AS r, c, d FROM t5, t6 ORDER BY a } { |
386 if {$r==2} { db eval { DELETE FROM t5 WHERE rowid = 3 } } | 386 if {$r==2} { db eval { DELETE FROM t5 WHERE rowid = 3 } } |
387 lappend res $r $c $d | 387 lappend res $r $c $d |
388 } | 388 } |
389 set res | 389 set res |
390 } {1 a b 1 c d 2 a b 2 c d} | 390 } {1 a b 1 c d 2 a b 2 c d} |
391 | 391 |
| 392 do_execsql_test delete-10.0 { |
| 393 CREATE TABLE t1(a INT UNIQUE, b INT); |
| 394 INSERT INTO t1(a,b) VALUES('1','2'); |
| 395 SELECT * FROM t1 WHERE a='1' AND b='2'; |
| 396 } {1 2} |
| 397 |
| 398 do_execsql_test delete-10.1 { |
| 399 DELETE FROM t1 WHERE a='1' AND b='2'; |
| 400 } |
| 401 |
| 402 do_execsql_test delete-10.2 { |
| 403 SELECT * FROM t1 WHERE a='1' AND b='2'; |
| 404 } |
| 405 |
392 | 406 |
393 finish_test | 407 finish_test |
OLD | NEW |