Hello, PL / SQL Programming articles continue. In my previous article, we talked about function, procedure blocks, and today we will look at character sets and data types. I recommend that you read the previous article before proceeding with this article.
Predefined Data Types:
This part can be a bit boring data types will be examined briefly.
Numeric: Contains numerical values used in arithmetic operations.
Character: The data type that holds a character
Boolean: Holds either True or False
Datetime: Data type with date and time
Number: This is the area where the numeric data is kept. NUMBER (full decimal).
PLS_INTEGER – BINARY_INTEGER: Unlike Number type, it performs faster arithmetic operations and takes less space.
BINARY_FLOAT – BINARY_DOUBLE: The data type ends with f (5.67f) and ends with d in BINARY_DOUBLE.
VARCHAR2 – NVARCHAR2: Variable is the field in which the alphanumeric or byte data is held.
TIMESTAMP: Keeps data of year, day, month, hour, minute and second.
DECLARE test1 VARCHAR2(10):='Oracle'; test2 VARCHAR2(10):='Oracle '; BEGIN IF test1=test2 THEN DBMS_OUTPUT.PUT_LINE(test1 ||'ile' ||test2||'aynıdır'); ELSE DBMS_OUTPUT.PUT_LINE(test1||' ile '||test2||'aynı değildir'); END IF; END; /
In the example, put a space character at the end of the test 2 variables and do a test.
LOB (Large Object) Data Types:
Data types are data types that hold data that are not of a particular data type (image, image, etc.).
BFILE: Large binary objects that are held outside the database on the operating system. It cannot exceed 4GB.
BLOB: These are large binary objects that are kept in the database and are 8 to 12TB in size.
CLOB: Character data is in large blogs is 8 to 12TB size.
NCLOB: NLS holds Unicode data of character type. It is 8 to 12TB in size.
I mentioned the variables part in PL / SQL Programming-1 article and finally I wanted to explain CONSTANT and DEFAULT usage.
We use it whenever we want to assign a constant value to the CONSTANT variable, which is similar to the static keyword in programming languages.
DEAULT: When defining the variable, we can give an unstable and variable value.
In the next article, we will continue with IF-ELSE structures.
812 views last month, 2 views today