1.

The storage in bytes required for VARCHAR(4) type ‘abcd’ is _____________(a) 1(b) 3(c) 5(d) 8The question was posed to me in exam.This interesting question is from String Data Types in section Data Type Reference, Operators and Functions of MySQL

Answer»

Correct option is (c) 5

Easy explanation: ‘VARCHAR’ values are not padded when they are stored. The TRAILING spaces are RETAINED when values are stored and retrieved in CONFORMANCE with standard SQL. The given size is 5 BYTES.



Discussion

No Comment Found

Related InterviewSolutions