CHAR is a fixed length string type data type.

Declaration


CHAR [ ( charLength) ]

Arguments

  • charLength: Defines the length for a value in this column. Values that are shorter than charLength will be padded with spaces to be charLength.

  • charLength should be an integer between 1 (default) and 254, inclusive, which is the number of bytes.

String Type

  • Fixed Length

Storage Size

  • Based on charLength, where charLength is the number of bytes.

Additional Information

  • charLength should be an integer between 1 (default) and 254, inclusive, which is the number of bytes.

Examples


CHAR(1)
'a'

CHAR(12)
Text value