p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Language (http://p2p.wrox.com/forumdisplay.php?f=100)
-   -   BETWEEN operator (http://p2p.wrox.com/showthread.php?t=83204)

RockBal April 6th, 2011 02:25 PM

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

om_prakash April 7th, 2011 12:55 AM

Please check the following thread which might help you:
http://p2p.wrox.com/book-beginning-s...-operator.html


All times are GMT -4. The time now is 06:18 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.