用户定义的数据类型与用户定义的类型与用户定义的表类型

时间:2021-05-09 16:29:05

I have come across the different types in sql server 2014.

我在sql server 2014中遇到过不同的类型。

  1. Userdefined datatypes
  2. Userdefined types
  3. User defined table types.
  4. 用户定义的表类型。

I googled to get an idea of what is the difference between these three?

我用谷歌搜索了解这三者之间的区别是什么?

All these three refers to a table structure which can use by creating an instance of that.

所有这三个都引用了一个表结构,可以通过创建它的实例来使用。

If so, Why do we need three different types?

如果是这样,为什么我们需要三种不同的类型?

1 个解决方案

#1


0  

User Defined Types came before User Defined Data Types, which is essentially the same thing with the additional ability to combine multiple (different) data types into a single element / unit. They just renamed it. User Defined Table Types is just a subset of User Defined Types specific to table structure definitions.

用户定义类型出现在用户定义数据类型之前,这与将多个(不同)数据类型组合到单个元素/单元中的附加功能基本相同。他们刚刚重命名了。用户定义的表类型只是特定于表结构定义的用户定义类型的子集。

#1


0  

User Defined Types came before User Defined Data Types, which is essentially the same thing with the additional ability to combine multiple (different) data types into a single element / unit. They just renamed it. User Defined Table Types is just a subset of User Defined Types specific to table structure definitions.

用户定义类型出现在用户定义数据类型之前,这与将多个(不同)数据类型组合到单个元素/单元中的附加功能基本相同。他们刚刚重命名了。用户定义的表类型只是特定于表结构定义的用户定义类型的子集。