Vidyalelo
MySQL · Q696

MySQL

Programming · MySQL · question 696

Q696

In oracle database variable length column is declared by . . . . . . . .

A.
Varchar
B.
Varchar 3
C.
Varchar2
Answer
D.
None of the mentioned

Answer: Option C

Solution

Answer: Option C
Solution:
This question asks about how you declare a column that can hold a varying amount of text in an Oracle database. Let's break down the options:
Option A: Varchar
This is a common data type for storing variable-length strings in many databases, including MySQL.
Option B: Varchar 3
This looks like a specific example of using VARCHAR, but it's incomplete. The "3" would typically represent the maximum length of the string.
Option C: Varchar2
This is the correct answer! In Oracle, Varchar2 is used for storing variable-length character strings.
Option D: None of the mentioned
Since Varchar2 is a valid data type for variable-length strings in Oracle, this option is incorrect.
In short, you would use Varchar2 to declare a column that can hold text of varying lengths in an Oracle database.