I have an addresses table with ZIP code field which has type VARCHAR. I need to select all addresses form this table using ZIP codes range. If I used next code:
select * from address where cast(zip as bigint) between 90210 and 90220
I get an error on fields where ZIP code cann't be cast as bigint.
How I can resolve this issue?