SQLite Forum

Unexpected output from the SELECT statement
Login
Hi all:

For query:

----------------------
```SQL
CREATE TABLE v0 ( v1 INTEGER PRIMARY KEY ) WITHOUT ROWID;
INSERT INTO v0 VALUES (10) ;
ALTER TABLE v0 ADD v2 INT;

SELECT * FROM v0 WHERE ( v1 = 20 ) OR ( v1 = 10 AND v2 = 10 );
/* outputs '10| '*/

```

----------------------

Since column v2 is empty, it is expected that the SELECT statement would output empty result. Unfortunately, the actual output returns the row. 

Looking forward to your reply.