Skip to content

Commit

Permalink
BETWEEN Dates Example
Browse files Browse the repository at this point in the history
The following SQL statement selects all orders with an OrderDate BETWEEN '01-July-1996' and '31-July-1996':/*

SELECT * FROM Orders
WHERE OrderDate BETWEEN #1/07/1996# AND #31/07/1996#;

/*OR:*/

SELECT * FROM Orders
WHERE OrderDate BETWEEN '1996-07-01' AND '1996-07-31';
  • Loading branch information
Sandeep-BlackHat authored Sep 4, 2020
1 parent 51bebe0 commit 096ac77
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions C0de5/Programs_2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@ The following SQL statement selects all products with a ProductName NOT BETWEEN
SELECT * FROM Products
WHERE ProductName NOT BETWEEN 'Carnarvon Tigers' AND 'Mozzarella di Giovanni'
ORDER BY ProductName;

/*BETWEEN Dates Example
The following SQL statement selects all orders with an OrderDate BETWEEN '01-July-1996' and '31-July-1996':/*
SELECT * FROM Orders
WHERE OrderDate BETWEEN #01/07/1996# AND #31/07/1996#;
/*OR:*/

SELECT * FROM Orders
WHERE OrderDate BETWEEN '1996-07-01' AND '1996-07-31';

0 comments on commit 096ac77

Please sign in to comment.