New answers tagged varchar
Each variable-width column in a row will require a single bit to maintain the nullability status (this is so SQL Server can check this bit, rather than skipping down to the row and parsing the contents of that column). Of course you can't add a single bit to a row, you need to add a byte for this data, which means that if you have a single variable-width ...
How would I extract the value of 0x9473FBCCBC01AFE from an XML query plan as a VARBINARY, rather than a VARCHAR? I faced something like that using HeidiSQL to query on CASD tables, and solved with fn_varbintohexstr(), like this: SELECT master.dbo.fn_varbintohexstr(table.hexfield) FROM table; With HeidiSQL, the value was wrong like ...
Do you have a rough idea of the expected max length? varchar(X) is limited to 255 character before MySQL 5.0.3 and 65k at most with MySQL 5.0.3 link Text data type should be big enough. You should also consider an update of your data model as suggested by @oNare
I second Srutzky. Agreed. Now, let me add a little bit of operational perspective that has a lot to do with your decision. Since you are currently on varchar(max) apprently there's no issue for you, but getting away from it has certain advantages in performance and operational capabilities. Just to give you one example, there is a useful feature called ...
Top 50 recent answers are included