Support Questions
Find answers, ask questions, and share your expertise

Select between range in sql

Select between range in sql

Contributor

Hi,

 

I need a suggestion, while select only rows when certain range met. For example, here is below dataset;

 

id|count|name|status

_________________

1| 10 | xxx | 0

2| 20 | yyy | 0

3| 30 | zzz | 1

4| 40 | qqq | 0

5| 50 | ppp | 0

 

I want select only between 0 and 1 expected result;

 

id|count|name|status

_________________

1| 10 | xxx | 0

2| 20 | yyy | 0

3| 30 | zzz | 1

 

sql : select * from tbl where status between 0 and 1 

But I got entire values from that table. Please give me any suggestion, im stuck on this.