1) When I run below query , DB is throwing an SQL error i.e.,
'Invalid Number'
SELECT b.col1,b.col2 FROM table b WHERE b.col1=123 AND b.col2 like '%0%'
2) But DB is not throwing any error when I use any value other than (0-10) in like operator
SELECT b.col1,b.col2 FROM table b WHERE b.col1=123 AND b.col2 like '%59%'
Both col1
and col2
are VARCHAR2
Error while converting varchar2 to int
You should write
your col1 of table may contain leading or trailing space for 0-10