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

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


Neha
 Neha
(@asha)
Member Admin
Joined: 1 year ago
Posts: 27
Topic starter  

What is the alternative to BETWEEN clause in SQL?


Quote
Topic Tags
SQL
myTechMint
(@mytechmint)
Member Moderator
Joined: 1 year ago
Posts: 29
 

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