BETWEEN operator
Dear friends,
could you please any one explain me, how the between operator working for string values. for examples
SELECT * FROM Persons
WHERE LastName
BETWEEN 'peter' AND 'sam'
the result set from the above query includes both 'peter' and 'sam'. but if i run the below query
SELECT * FROM Persons
WHERE LastName
BETWEEN 'peter' AND 'sa'
the result doesn't include sam. why its not included in the result set and how the sql server works.
Thanks,
Rockbal
|