I have a table which has a column called "CUSTOMER_ID" and datatype of varchar2.

I need to select all the rows with a value greater than 1013986 so I try using:

select * from TABLE.A1_Cust_Cont WHERE CUSTOMER_ID>'1013986' order by CUSTOMER_ID asc;

But it selects all the rows in the table - including numbers smaller. I assume I need to let SQL know to look at the CUSTOMER_ID column as a number.

Any help would be appreciated.

Thanks