对增加现有表的列长的影响 [英] Impact for increasing the column length of an existing table

查看:57
本文介绍了对增加现有表的列长的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现有表中列的数据类型为Char(4)类型.现在,如果我将列长增加为10,则在选择该行时会有任何影响.

The datatype of a column in a existing table is of type Char(4). Now, is there any impact while selecting that row if I increase the column length to say 10.

推荐答案

我相信,当您增加一个char字段时,会在某些数据库(如果不是全部)中添加额外的空格来填充那些尚未填充的空格.

I believe when you increase a char field, extra spaces are added to fill in those not already filled, in some databases if not all.

这可能会影响某些不希望这种行为的程序,并且如果不修剪多余的空格,可能会导致某些输出问题.

This may impact some programs that were not expecting this behaviour, and may cause some output issues if extra whitespace is not being trimmed.

我认为类似子字符串的函数(以及那些取决于字符串长度的函数)也可能会受到影响,因为您的字符串长度现已更改.

I assume substring-like functions (and those depending on string length) may also be affected as the length of your string has now changed.

这篇关于对增加现有表的列长的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆