varchar(max) MS SQL Server 2000, problems?

前端 未结 4 1294
傲寒
傲寒 2021-01-02 01:52

I\'ve inherited a asp.net website project that currently runs SQL Server 2000 as its backend.

I\'ve been doing some databases changes on a local copy of the db using

4条回答
  •  灰色年华
    2021-01-02 02:21

    It sounds like the varchar(MAX) limitations are a moot point if your live DB is SQL Server 2000, which doesn't support them. If you have more than 8K characters to store you are pretty much left with the only other option, a TEXT column. However, beware that TEXT columns have a lot of limitations too.

    For example you can't sort or group on them easily, nor can you compare them for equivalency with other columns. That is you can't say Select * from mytable where Mytext1 = mytext2.

    Other relevant concerns:

    • I'd suggest using an NText or NVarchar column regardless of the way you go to support Unicode.
    • If the table has a lot of other columns and the varchar(8000) column is likely to be frequently close to full, you may have problems with the row limit of 8K. Keep this in mind too.

提交回复
热议问题