Differences between char and varchar2 data types

Explain the differences between char and varchar2 data types.

When a column is of type char, the memory used will not be dependent on the value. It entirely depends on the bytes defined.

Example:
Name CHAR(10)

Each value will occupy 10 bytes of memory space even though the value may be of a smaller size.
When a column is of type varchar2, the memory used entirely depends on the value of the column.

Example:
Name VARCHAR2(10)

Each value will occupy “x” bytes of memory space depending on the value.
To summarize, char data type is usually used when the value of fixed size is ascertained; for example Student id.
On the other hand, varchar2 should be used for variable length of data; for example Name.

Explain the differences between char and varchar2 data types.

The char data type accepts strings that are of fixed length.

The VARCHAR2 data type is a varying length data type.
Explain BLOB, CLOB, NCLOB and BFILE
BLOB, CLOB, NCLOB are stored internally where as BFILE is stored externally....
Explain ROWID in oracle
Each table in oracle has a pseudocolumn called ROWID. Oracle uses ROWID to store address of each rows of the table......
What is a LOB data type?
The LOB datatypes includes BLOB, CLOB, NCLOB and BFILE that can store large blocks of unstructured data such as graphic images......
Post your comment