Hi,
I was storing integer values like 5000 and 10000 in a column which was defined as varchar.
i was trying to use statement like
1.
but was not working but
2.
but i changed the datatype to int and it started working . 1st statement started working,just confused
Just wanted to know how ' ' was making difference in the statement
I was storing integer values like 5000 and 10000 in a column which was defined as varchar.
i was trying to use statement like
1.
Code:
select * from mytable where mycol between '5000' and '10000';
but was not working but
2.
Code:
select * from mytable where mycol between 5000 and 10000;
Just wanted to know how ' ' was making difference in the statement
Comment