CBSE Class 12 Computer Science Question 28 of 79

Table Creation and Data Manipulation Commands — Question 2

Back to all questions
2
Question

Question 2

The data types CHAR(n) and VARCHAR(n) are used to create ..............., and ............... length types of string/text fields in a database.

  1. Fixed, equal
  2. Equal, variable
  3. Fixed, variable
  4. Variable, equal
Answer

Fixed, variable

Reason — CHAR datatype specifies a fixed length string. Defining a length is not required, but the default is 1. While VARCHAR datatype specifies a variable length string. Defining a length is required.