NUMBER(m,n) : Number Type « Data Type « Oracle PL / SQL






NUMBER(m,n)

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


Table created.

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

1 row created.

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

1 row created.

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

1 row created.

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

1 row created.

SQL>
SQL> SELECT * FROM product;

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

SQL>
SQL> DROP TABLE product;

Table dropped.

SQL>
SQL>
 17     l_iv := utl_i18n.string_to_raw (p_iv, 'AL32UTF8');
 18     l_key := utl_i18n.string_to_raw (p_key, 'AL32UTF8');
 19     l_enc_val :=
 20        dbms_crypto.encrypt (src      => l_in,
 21                             KEY      => l_key,
 22                             iv       => l_iv,
 23                             typ      =>   l_enc_algo
 24                                         + dbms_crypto.chain_cbc
 25                                         + dbms_crypto.pad_pkcs5
 26                            );
 27     l_ret := RAWTOHEX (l_enc_val);
 28     RETURN l_ret;
 29  END;
 30  /

Function created.

SQL>
SQL>
SQL>

   
    
    
  








Related examples in the same category

1.Numeric Data Type Conversion Chart
2.Character Data Type Conversion Chart
3.declare number variable
4.Use number as the column type
5.Create a table with number type column: number(4)
6.Do calculation in select statement with number type column
7.Update number type column with calculation
8.Declare number variable and assign value
9.Identical declarations using NUMBER subtypes
10.A numeric variable with no specified size, no initial value
11.Use Case statement with number type value
12.use number value with in operator
13.Comparison operator with number value and order by
14.Number that exceeds precision
15.Compare number value in if statement
16.Compare number value with != (not equals)
17.Compare number value with 'between ... and'
18.Compare number value with =(equals)
19.Compare number value with >
20.select 5.1d, 42f from dual
21.Initiate number value to 0
22.Add one to current number type value of counter
23.An if-then statement comparing two numeric literals