Bug #87214 Allow CHAR fields multiple padding options

Submitted: 26 Jul 2017 22:08
Reporter: Bob Terrell Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Data Types Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: char

[26 Jul 2017 22:08] Bob Terrell
Description:
Say I have a CHAR(10) field. I store the value '123456789'.

Internally, it's stored as '123456789 '.

It would be useful if I could specify at table creation that I wanted it to pad on the left, using the character '0'.

Then I would get '0123456789'.

How to repeat:
Make a char field.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.