这是怎么回事?我期望下面的删除从表中删除所有内容。对于我来说,sqlite3的行为有没有根本的误解?sqlite3删除不会删除所有内容?
sqlite> .schema
CREATE TABLE ip_domain_table (ip_domain TEXT, answer TEXT, ttl INTEGER, PRIMARY KEY(ip_domain, answer, ttl));
sqlite> select count(*) from ip_domain_table where ttl < 9999999999 ;
1605343
sqlite> pragma cache_size=100000; delete from ip_domain_table where ttl < 9999999999;
sqlite> select count(*) from ip_domain_table where ttl < 9999999999 ;
258
Q:为什么计数显示 “258”?它不应该是0吗?
如果我这样做,它会删除所有条目按预期方式。
sqlite> select count(*) from ip_domain_table;
1605343
sqlite> pragma cache_size=100000; delete from ip_domain_table;
sqlite> select count(*) from ip_domain_table;
0