使用SQL语句中的BETWEEN关键字,示例如下:
SELECT column1, column2, ... FROM table_name WHERE columnX BETWEEN value1 AND value2;
其中,columnX为要按范围查看的列名,value1和value2为范围值的起始和结束点。例如,要查看年龄在20到30岁之间的员工,可以使用以下SQL语句:
SELECT name, age FROM employees WHERE age BETWEEN 20 AND 30;