Difference between revisions of "Match a range of dates"

From SQLZOO
Jump to: navigation, search
(Created page with "Match a range of dates <div class='ht'> <div class=params>schema:scott</div> <div> The BETWEEN clause may be used with dates, numbers and strings. </div> <source lang=sql cla...")
 
 
Line 1: Line 1:
 
Match a range of dates
 
Match a range of dates
 
<div class='ht'>
 
<div class='ht'>
<div class=params>schema:scott</div>
+
<div class=params>schema:gisq</div>
 
<div>
 
<div>
 
The BETWEEN clause may be used with dates, numbers and strings.
 
The BETWEEN clause may be used with dates, numbers and strings.

Latest revision as of 15:39, 17 July 2012

Match a range of dates

schema:gisq

The BETWEEN clause may be used with dates, numbers and strings.

 
 
SELECT * FROM totp
 WHERE wk BETWEEN DATE '1980-05-20'
              AND DATE '1980-05-26'
SELECT * FROM totp
 WHERE wk BETWEEN '1980-05-20'
              AND '1980-05-26'
SELECT * FROM totp
 WHERE wk BETWEEN #20 May 1980#
              AND #26 May 1980#
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense