What is the difference between CHAR(n) and VARCHAR(n) in SQL?
Ask by ICSM Computer
Updated 19 Aug 2025
Note:
CHAR(n)
nbytes, regardless of the actual string length.'ABC '(with 2 trailing spaces).BytesUsed = 5.VARCHAR(n)
'ABC'(no padding).BytesUsed = 3.