3 ms·
No database has a limit of 255 characters. Varchar limits are; MySQL - 65,535. MS SQL Server 2005 - 8000 (or 2GB if you use varchar(max) ). Oracle 9i - 4000 Th
by onion2k 12y ago
No database has a limit of 255 characters. Varchar limits are; MySQL - 65,535. MS SQL Server 2005 - 8000 (or 2GB if you use varchar(max) ). Oracle 9i - 4000
These are not character limits. They're byte limits. If you're storing multibyte strings (eg unicode-16, emoji, etc) then each character will take up more than one 'space'.
But really, asking on HN? This is what StackOverflow is for.
- markcrazyhorse 12y agoI thought about that but SO is usually for more detailed questions etc. I have seen similar questions like this be put on hold and slated by the users
- stephenr 12y agoThe OP is not as wrong as you suggest. Prior to MySQL 5.0.3, varchar was limited to 255 bytes. Also, there is a maximum row length for all columns which is 65,535 bytes, so the practical maximum size for a varchar column is less, unless it's the only column in the table.
- markcrazyhorse 12y agoThanks for the reply - Very Useful