加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

sql-server – SQL Server ANSI_Padding

发布时间:2020-12-12 16:11:38 所属栏目:MsSql教程 来源:网络整理
导读:如果我右键单击SQL Server Management Studio中的表,并选择“脚本表为创建到新查询编辑器窗口“显示的代码包含: SET ANSI_PADDING ON ….创建表… SET ANSI_PADDING OFF 所以,我猜,ANSI_Padding是否打开或关闭影响整个数据库,它打开创建一个表,然后再关闭?
如果我右键单击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 in char,varchar,
binary,and varbinary 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将在创建列时根据设置存储值.现有列不受以后更改此设置的影响.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读