Subject | Help with strange answer in WHERE clause |
---|---|
Author | hcarvajalsy |
Post date | 2004-05-03T21:03:16Z |
Hello,
I am having a strange behaviour in a SELECT statement. The field
over which I do the WHERE is defined as VARCHAR(5). If I do:
SELECT COUNT(*) FROM STUDENTS WHERE SCHOOL <= '999';
I get 10,569 as the answer, but if I do:
SELECT COUNT(*) FROM STUDENTS WHERE SCHOOL <= '1000';
I get 0 as the answer.
Thanks.
I am having a strange behaviour in a SELECT statement. The field
over which I do the WHERE is defined as VARCHAR(5). If I do:
SELECT COUNT(*) FROM STUDENTS WHERE SCHOOL <= '999';
I get 10,569 as the answer, but if I do:
SELECT COUNT(*) FROM STUDENTS WHERE SCHOOL <= '1000';
I get 0 as the answer.
Thanks.