Why not use varchar(max)?

后端 未结 8 2011
广开言路
广开言路 2020-12-05 17:03

I\'m a bit old school when it comes to database design, so I\'m totally for using the correct data sizes in columns. However, when reviewing a database for a friend, I notic

8条回答
  •  一向
    一向 (楼主)
    2020-12-05 17:35

    I don't know how sql server handles large (declared) varchar fields from a performance, memory and storage perspective.. but assuming it does so as efficiently as smaller declared varchar fields, there's still the benefit of integrity constraints.

    The application sitting on the db is supposed to have limits on the input, but the database can properly report an error if the application has a bug in this respect.

提交回复
热议问题