(text/x-markdown)
See forum post from Vladimir Panteleev here: <a href=https://sqlite.org/forum/forumpost/96896f825d>
https://sqlite.org/forum/forumpost/96896f825d
</a>
Reproduce with:
CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c)
WITH s(i) AS (
SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<50000
)
INSERT INTO t1(a, b, c) SELECT i, 123, 456 FROM s;
ALTER TABLE t1 DROP COLUMN b;
SELECT count(*), c FROM t1 GROUP BY c;
The result of the final query should be (50000, 456) - the value of "c" for all rows is 456 - but instead shows that for some rows "c" has the value 123.
|