Reputation: 45
I have a table with field q4 as type integer(10) with default value 0.
I want results where q4 is greater than or equal to 1.
I have tried this in sqlite.
SELECT * FROM g101 WHERE q4 >= 1
But it is showing two rows with value of 0.
Please help,
Thank in advance
Upvotes: 2
Views: 4276
Reputation: 180080
sqlite> create table g101(q4);
sqlite> insert into g101 values (0), ('0');
sqlite> SELECT * FROM g101 WHERE q4 >= 1;
0
Apparently, you have text values in your table.
(Please note that SQLite pretty much ignores column types.)
Upvotes: 4