Data Types In Oracle

Data type come in several forms and sizes.The decision made in choosing proper data types greatly influence the performance of the database.



Data TypeExplanation
CHAR(SIZE)Used to store character strings values of fixed length. (Size) discover the number of characters the cell can hold. Maximum 255 characters can holds this data type.
VARCHAR(SIZE) / VARCHAR2(SIZE)Used to store variable length alphanumeric data. It is a more flexible form of CHAR data type. Maximum 4000 characters can hold this data type.
DATEUsed to represent date and time. DD-MON-YY is the standard format. To enter dates other than standard format, use the appropriate function.
NUMBER(P,S)Used to store numbers (Fixed or floating point). valid values are 0 and positive and negative numbers with magnitude.
(P) Determines the maximum length of data.
(S) determines the number of places to the right of the decimal.
LONGUsed to store variable length characters containing upto 2 GB. Also used to store arrays of binary data in ASCII format. Only one LONG value can be defined per table.
Long value cannot be used in subqueries, functions, expressions, where clauses or indexes and the normal character functions like SUBSTR.
RAW / LONG RAWUsed to store binary data, such as digitized picture or image.
RAW data type can have a maximum length of 255 bytes.
LONG RAW data type can contain up to 2 GB. Values stored in columns having LONG RAW data type cannot be indexed.
March 18, 2020 / by / 0 Comments

No comments:

Post a Comment

Thanks for your comments

Post Top Ad