Any hidden pitfalls changing a column from varchar(8000) to varchar(max)?

后端 未结 3 2108

I have a lot (over a thousand places) of legacy T-SQL code that only makes INSERTs into a varchar(8000) column in a utility table. Our ne

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-20 12:40

    If you genuinely don't need indexes and it is a large column you should be fine. Varchar (max) appears to be exactly what you need and you will have less problems with existing code than you would if you used text.

    Make sure to test any updates where text is added to the existing text. It should work using regular concatenation, but I'd want to be able to prove it.

提交回复
热议问题