What if I wanted to define a custom column format in MySQL? The custom format that I want is always a 2 digit integer, followed by the # sign, then a space, then a decimal number with 2 digits after the decimal. Examples of allowed values are like this:
30# 11.00
27# 17.25
40# 17.25
values that are not allowed are like this:
30# 11
40# 20.5
some string
Is this possible in MySQL? If so, any hints on how to do it?
well since “The CHECK clause is parsed but ignored by all storage engines.” in mysql, your only remaining option would be to add a before insert/update trigger on your table to regexp your input and proceed.