Number column : Number « SQL Data Types « Oracle PL/SQL Tutorial






SQL> CREATE TABLE myNumberColumnTable (
  2       product_name  VARCHAR2(25),
  3       product_price NUMBER(4,2));

Table created.

SQL>
SQL> INSERT INTO myNumberColumnTable VALUES ('Product Name 1', 1);

1 row created.

SQL> INSERT INTO myNumberColumnTable VALUES ('Product Name 2', 2.5);

1 row created.

SQL> INSERT INTO myNumberColumnTable VALUES ('Product Name 3', 50.75);

1 row created.

SQL> INSERT INTO myNumberColumnTable VALUES ('Product Name 4', 99.99);

1 row created.

SQL>
SQL> SELECT * FROM myNumberColumnTable;

PRODUCT_NAME              PRODUCT_PRICE
------------------------- -------------
Product Name 1                        1
Product Name 2                      2.5
Product Name 3                    50.75
Product Name 4                    99.99

4 rows selected.

SQL> DROP TABLE myNumberColumnTable;

Table dropped.

SQL>
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