무슨 일이야? 나는 테이블에서 모든 것을 삭제하기 위해 다음과 같은 삭제를 기대할 것이다. 내 부분에 sqlite3이 어떻게 작동하는지에 대한 근본적인 잘못 이해가 있습니까?sqlite3 delete가 모든 것을 삭제하지 않습니까?
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