08.14.07

Transact-SQL Reserved Keyword – Between

Posted in Code Speak at 11:47 pm by codetiger

View all sales information between January 6, 1999, and January 10, 1999, in Table Store_Information, Table Store_Information

store_name Sales Date
Los Angeles $1500 Jan-05-1999
San Diego $250 Jan-07-1999
San Francisco $300 Jan-08-1999
Boston $700 Jan-08-1999

we key in,

SELECT *
FROM Store_Information
WHERE Date BETWEEN ‘Jan-06-1999′ AND ‘Jan-10-1999′

Leave a Comment