Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚注意到我smallInt在一个领域,那应该只是int。仅仅改变它就安全吗?该表中的所有数据会发生什么变化?
smallInt
int
是的,将较小的值更改为较大的值是安全的,无需担心任何数据截断或其他问题。
如果反过来,您将不得不担心任何数据值的最大值,同时转移到较小的数据类型。