Advertisements
Advertisements
Question
In which datatype the value stored is padded with spaces to fit the specified length.
Options
DATE
VARCHAR
FLOAT
CHAR
MCQ
Solution
CHAR
Explanation:
- CHAR is a fixed-length SQL datatype. When a value in a CHAR field is less than the specified length, it is padded with spaces.
- For example, if you construct a CHAR(5) column and enter the value 'Hi', the database will save it as 'Hi' (with three spaces).
shaalaa.com
Is there an error in this question or solution?