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)
Author: Dev
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)
PL/SQL Boolean
The Oracle PL/SQL Boolean data type is a data type that can store two values: TRUE or FALSE. The Boolean data type is often used in programming to store values that can only be one of two options, such as true or false. Syntax To declare a variable with the Boolean data type, you use…(Continue Reading)