1BETWEEN wählt Werte innerhalb eines bestimmten Bereichs aus.
2Die Werte können Zahlen, Text oder Datumsangaben sein.
3
4SELECT column_name(s)
5FROM table_name
6WHERE
7 column_name BETWEEN value1 AND value2;
8
1/*the BETWEEN operator is used to filter the result set within
2a certain range. the values can be numbers, texts or dates */
3SELECT column_name(s)
4FROM table_name
5WHERE column_name BETWEEN value1 AND value2;
1SELECT * FROM my_table WHERE my_col BETWEEN 10 AND 20;
2-- equivalent to
3SELECT * FROM my_table WHERE my_col >= 10 AND my_col <= 20;
1SELECT column_name(s)
2FROM table_name
3WHERE column_name BETWEEN value1 AND value2;
1#The BETWEEN operator selects a range of data between two values. The values can be numbers,
2#text, or dates.
3syntax->SELECT column_name(s)
4FROM table_name
5WHERE column_name
6BETWEEN value1 AND value2
7///example///
8SELECT * FROM Persons
9WHERE LastName
10BETWEEN 'Hansen' AND 'Pettersen'
1Select * From employees
2Where salary >= 4000
3And salary <= 6000
4
5We can also use between
6
7Select * From employees
8Where salary BETWEEN 4000 AND 6000