Compare number value with 'between ... and'
SQL>
SQL>
SQL> CREATE TABLE customers
2 (
3 id NUMBER,
4 gender CHAR(1),
5 year_of_birth NUMBER(4),
6 marital_status VARCHAR2(20),
7 address VARCHAR2(40),
8 state_province VARCHAR2(40),
9 email VARCHAR2(30)
10 );
Table created.
SQL> select id, gender, year_of_birth
2 from customers
3 where state_province = 'CT'
4 and gender = 'M'
5 and year_of_birth between 1936 and 1939;
no rows selected
SQL>
SQL> drop table customers;
Table dropped.
Related examples in the same category