-4
SELECT * 
FROM claz 
WHERE student AND (BETWEEN date AND date) 

I have this one table claz, and I need to search to find student records between date periods

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

4 Answers4

0

You may try to use it like this:

SELECT *  
FROM claz  
WHERE student = 'somevalue'
  AND date_column BETWEEN '2013/02/25' AND '2013/02/27'

or like this:

SELECT *  
FROM claz  
WHERE student = 'somevalue'
  AND date_column >'2013/02/25' AND date_column <'2013/02/27'

But it not very clear what you are trying to achieve

Hawk
  • 5,060
  • 12
  • 49
  • 74
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
0

Try:

SELECT * FROM claz
WHERE student = ?
AND date BETWEEN date1 AND date2;

Not sure thought what your student should match and what name your date-column has. Couldn't test it, as I am not near my DB at the moment.

Armunin
  • 986
  • 7
  • 18
0

try this..

SELECT * FROM claz WHERE student = 'BG' AND date < maxdate AND date > mindate;
subash
  • 3,116
  • 3
  • 18
  • 22
0

try this

SELECT * 
FROM claz 
WHERE student='name' 
  AND date BETWEEN 'date one' AND 'date two'
Hawk
  • 5,060
  • 12
  • 49
  • 74
Rajika Nanayakkara
  • 658
  • 1
  • 6
  • 11