title: Is a VARCHAR(20000) valid in MySQL?
body: <p>I’m in need of some clarification of the maximum length of a varchar field in MySQL.</p>
  
  <p>I’ve always thought the max length was 255 (255 what? Characters I’ve assumed, but this might be a source of my confusion). Taking a look at the tables of a database set up by an external company we’re working with, I see a field set-up as varchar(20000), holding chunks of xml longer than 255 characters. Why does this work? Is 20000 a valid value?</p>
  
  <p>A bit of googling has revealed that in mysql varchar has a limit of 65,535 bytes, and I see varchar(65535) <a href="https://stackoverflow.com/questions/332798/equivalent-of-varcharmax-in-mysql">in use</a>, so how does the 255 limit relate to this?</p>