English

In which datatype the value stored is padded with spaces to fit the specified length. - Computer Science (Python)

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:

  1. 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.
  2. 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?
2024-2025 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×