Predikßt BETWEEN (SQL)

predikßt_BETWEEN ::= v²raz [ NOT ] BETWEEN v²raz2 AND v²raz3

Predikßt BETWEEN °φkß, zda hodnota v²razu je mezi hodnotou v²razu2 a v²razu3. Typy vÜech v²raz∙ musφ b²t porovnatelnΘ.

Jednß se o zjednoduÜen² zßpis podmφnky (v²raz >= v²raz2) AND (v²raz =< v²raz3).

P°φklad pou₧itφ:

SELECT * 
FROM Lidi
WHERE dat_nastupu BETWEEN 1.1.1997 AND 31.12.1997