The Oracle PL/SQL NUMBER data type is used to store numeric values. It can be either an integer or a decimal number. Syntax The syntax for the NUMBER data type is as follows: number number(38) number(10,2) The first form, “number”, stores up to 38 digits. The second form, “number(38)”, stores up to 38 digits with…(Continue Reading)
Author: Dev
PL/SQL INT
The PL/SQL INT data type in Oracle database is used to store whole numbers. Syntax The syntax for declaring a variable of type INT is: variable_name INT; Example For example, the following declaration creates a variable called var_int: declare var_int INT; begin var_int := 10; dbms_output.put_line(‘1. var_int = ‘||var_int); var_int := var_int * 2; dbms_output.put_line(‘2.…(Continue Reading)
PL/SQL DATE
The Oracle PL/SQL DATE data type is used to store date and time values. Syntax The syntax for declaring a DATE variable is as follows: variable_name DATE; Examples An example of how to declare a DATE variable, assign a value, and store it in a table is as follows: DECLARE l_date DATE; BEGIN l_date :=…(Continue Reading)
PL/SQL CLOB
The Oracle PL/SQL CLOB or Character Large Object data type is used to store character-based data in a database. This data type is often used to store text, json or xml documents. Syntax The syntax for creating a CLOB column is as follows: CREATE TABLE table_name ( column_name CLOB ); Example An example of using…(Continue Reading)
PL/SQL CHAR
The Oracle PL/SQL CHAR data type is used to store character data. Syntax The syntax for declaring a CHAR variable is: CHAR(size) where size is the number of characters that can be stored in the variable. For example, a CHAR(10) variable can store up to 10 characters. Examples To convert a number, date or varchar…(Continue Reading)