开发者

ANSI PADDING defaults question [closed]

开发者 https://www.devze.com 2023-01-31 23:02 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 7 months ago.

Improve this question

I have SQL Server 2008 SP2. I noticed that DBs by default have Properties | Options | Miscellaneous | ANSI Padding Enabled = FALSE.

However, this BOL article warns against setting it to off (no reason given). Further, this article states this feature is going to be deprecated.

I have two questions:

  1. What is the "problem" with havi开发者_运维问答ng it off for current work (future deprecation aside)?
  2. Why is it defaulted to FALSE when BOL says the default is ON, and should this setting therefore be changed?


To your second point: I'm not quite sure why the default setting for you is OFF, when this article (SQL Server 2008) states that the default is ON:

http://msdn.microsoft.com/en-us/library/ms187403.aspx

To your first point: if you don't want padded values, you can just set your columns to VARCHAR. Setting padding = OFF means you are effectively suppressing the difference (in this sense) between CHAR and VARCHAR columns.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号