So I have the following table:
qliu=# select id from api_member;
id
-----
242
236
246
251
253
9
21
185
49
188
I want to be able to delete rows with a range of ids with something like the following command:
delete from api_member where id between '0' and '10';
But it deletes nothing. Also if you were wondering
delete from api_member where id between 0 and 10;
I get the following error:
ERROR: operator does not exist: character varying >= integer LINE 1: delete from api_member where id between 0 and 10; ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
varcharcolumn. The problem you have, stems directly from that bad design decision.