如果我右键单击sql Server Management Studio中的表,并选择“脚本表为>创建到>新查询编辑器窗口“显示的代码包含:
SET ANSI_PADDING ON
….创建表…
SET ANSI_PADDING OFF
所以,我猜,ANSI_Padding是否打开或关闭影响整个数据库,它打开创建一个表,然后再关闭?
如果使用ANSI_Padding创建表,会发生什么?你怎么能把它打开那张桌子?
解决方法
07000 Controls the way
the column stores values shorter than
the defined size of the column,and
the way the column stores values that
have trailing blanks inchar
,varchar
,
binary
,andvarbinary
data.In a future version of Microsoftsql Server ANSI_PADDING will
always be ON and any applications that
explicitly set the option to OFF will
produce an error. Avoid using this
feature in new development work,and
plan to modify applications that
currently use this feature.
此设置仅影响新列的定义.在创建列之后,sql Server将在创建列时根据设置存储值.现有列不受以后更改此设置的影响.