Ticker

6/recent/ticker-posts

Data Types in Oracle PL/SQL

In this PL/SQL Tutorial, We will explore about the Data Types in Oracle PL/SQL.

What is Data Types in Oracle PL/SQL?

Data Types is define in the PL/SQL program or in the block that which type of data have stored to the variables. Data Types defined with the constant and parameters.

If you are new to this post then I will suggest please read our previous blog where is we giving full information about the variables and constants. How can you use define data types as a parameter, we will cover this topic in the function and procedure section.

Every data types is divided with three rules.

  1. Specifies Format
  2. Constraints
  3. Range of Values

Let's understand more about the above rules.

Specifies Format

Whenever you define variables in the program or block then they have store same data format which you defines at time of variables declaration.

Example:- v_check char(1);

Here char is defined as a specified format where v_check variable will store only character string.

Constraints

Understand with the above example, v_char only store character value it's means we define a rule that v_char will only work with the character string.

Range of Values  

Understand with the above example, v_char only store one character string if you will exceed the string,program returns an error that character string buffer too small.

I think, you understood about the data types with it's rules. Now we talk about category of data types in Oracle PL/SQL.

Actually Data Types have  categorized into four types.

  1. Composite Data Types(Record, Array etc.)
  2. LOB Data Types(BLOB,CLOB,NCLOB etc.)
  3. Reference Data Types(Cursors,Ref)
  4. Scalar Data Types(Number,Character String)

That's all for today, I think this post will help to you for understand about the Data Types in Oracle PL/SQL.If you like the post the please share your view in the comment section.

More to Learn about the Data Types in Oracle PL/SQL then click here.

Post a Comment

0 Comments