Use IN for number value : Number « SQL Data Types « Oracle PL/SQL Tutorial






SQL>
SQL> CREATE TABLE promotion(
  2    title_id     CHAR(3)      NOT NULL,
  3    advance      DECIMAL(9,2) NULL    ,
  4    royalty_rate DECIMAL(5,2) NULL);

Table created.

SQL>
SQL>
SQL> INSERT INTO promotion VALUES('T01',10000,0.05);

1 row created.

SQL> INSERT INTO promotion VALUES('T02',1000,0.06);

1 row created.

SQL> INSERT INTO promotion VALUES('T03',15000,0.07);

1 row created.

SQL> INSERT INTO promotion VALUES('T04',20000,0.08);

1 row created.

SQL> INSERT INTO promotion VALUES('T05',100000,0.09);

1 row created.

SQL> INSERT INTO promotion VALUES('T06',20000,0.08);

1 row created.

SQL> INSERT INTO promotion VALUES('T07',1000000,0.11);

1 row created.

SQL> INSERT INTO promotion VALUES('T08',0,0.04);

1 row created.

SQL> INSERT INTO promotion VALUES('T09',0,0.05);

1 row created.

SQL> INSERT INTO promotion VALUES('T10',NULL,NULL);

1 row created.

SQL> INSERT INTO promotion VALUES('T11',100000,0.07);

1 row created.

SQL> INSERT INTO promotion VALUES('T12',50000,0.09);

1 row created.

SQL> INSERT INTO promotion VALUES('T13',20000,0.06);

1 row created.

SQL>
SQL>
SQL> SELECT title_id, advance
  2    FROM promotion
  3    WHERE advance IN
  4          (0.00, 1000.00, 5000.00);

TIT    ADVANCE
--- ----------
T02       1000
T08          0
T09          0

SQL>
SQL>
SQL> drop table promotion;

Table dropped.

SQL>








10.9.Number
10.9.1.Number column
10.9.2.Plus two number type columns together
10.9.3.Compare Number type in where clause
10.9.4.NUMBER data type
10.9.5.NUMBER datatype: PRECISION 5 SCALE 2
10.9.6.NUMBER(4,2) as column type
10.9.7.select 5.1d, 42f from dual;
10.9.8.Use IN for number value