select * from table where age between 30 and 40;
用between的话根据不同的数据库,可能取不到30或者40,保险点可以用
select * from table where age >= 30 and a <= 40;
select * from table where age between 30 and 40;
用between的话根据不同的数据库,可能取不到30或者40,保险点可以用
select * from table where age >= 30 and a <= 40;