1.

Write one similarity and one difference between CHAR and VARCHAR data types.

Answer»

Similarity :

(i) Both are used for storing non-numeric data.

(ii) Both can store 1 to 255 characters.

(iii) Values must be enclosed in single quotes or double quotes.

Difference :

CHAR VARCHAR
Used for fixed-length stringUsed for variable length string
Padded to the specified length when storedNo padding takes place



Discussion

No Comment Found

Related InterviewSolutions