SQL - BETWEEN vs = ...
 
Share:
Notifications
Clear all

SQL - BETWEEN vs = or What is the alternative to BETWEEN clause?


Neha
 Neha
(@asha)
Member Admin
Joined: 4 years ago
Posts: 31
Topic starter  

What is the alternative to BETWEEN clause in SQL?


Quote
Topic Tags
SQL
myTechMint
(@mytechmint)
Member Moderator
Joined: 4 years ago
Posts: 52
 

They are identical.

BETWEEN is a shorthand for the longer syntax.

Use an alternative longer syntax where BETWEEN doesn't work e.g.

Select EventId,EventName from EventMaster
where EventDate >= '10/15/2009' and EventDate < '10/19/2009'

(Note: < rather than <= in second condition.)


Neha liked
ReplyQuote