MS SQL Server: Anomalies
Note: I use mixed mode authentication and prefer not to use Windows or domain users.
VARCHAR or TEXT:
Pro VARCHAR: They recommend to avoid using fields of type TEXT as much as possible?! ..because of performance issues which is because the TEXT data is kept separately. You can not apply filters and sorts on TEXT fields.
Pro TEXT: M$ SQL Server will not allow you to store a record of size over 8060 bytes. Practically, you can have 5 fields of type VARCHAR(4000) in one record, but if you request to save a record including large articles, for instance, 2000 characters each, you will be refused.
Beware: In your PHP code, you may experience truncation of large text (255 characters). If you are using VIEWs or FUNCTIONs that gather tables having TEXT fields, I recommend to use explicitly redefining data types. It’s not PHP’s fault; M$ has not updated the client library for long time :p