You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifies whether the type can hold a null value. If not specified, NULL is the default.
183
188
184
189
*assembly_name*
185
-
||
186
-
|-|
187
-
|**Applies to**: [!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)].|
190
+
**Applies to**: [!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)].
188
191
189
192
Specifies the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] assembly that references the implementation of the user-defined type in the common language runtime. *assembly_name* should match an existing assembly in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] in the current database.
190
193
191
194
> [!NOTE]
192
195
> EXTERNAL_NAME is not available in a contained database.
193
196
194
197
**[.***class_name***]**
195
-
||
196
-
|-|
197
-
|**Applies to**: [!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)].|
198
+
**Applies to**: [!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)].
198
199
199
200
Specifies the class within the assembly that implements the user-defined type. *class_name* must be a valid identifier and must exist as a class in the assembly with assembly visibility. *class_name* is case-sensitive, regardless of the database collation, and must exactly match the class name in the corresponding assembly. The class name can be a namespace-qualified name enclosed in square brackets (**[]**) if the programming language that is used to write the class uses the concept of namespaces, such as C#. If *class_name* is not specified, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] assumes it is the same as *type_name*.
200
201
201
-
<column_definition>
202
+
\<column_definition>
202
203
Defines the columns for a user-defined table type.
203
204
204
205
\<data type>
205
206
Defines the data type in a column for a user-defined table type. For more information about data types, see [Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md). For more information about tables, see [CREATE TABLE (Transact-SQL)](../../t-sql/statements/create-table-transact-sql.md).
206
207
207
-
<column_constraint>
208
+
\<column_constraint>
208
209
Defines the column constraints for a user-defined table type. Supported constraints include PRIMARY KEY, UNIQUE, and CHECK. For more information about tables, see [CREATE TABLE (Transact-SQL)](../../t-sql/statements/create-table-transact-sql.md).
209
210
210
-
<computed_column_definition>
211
+
\<computed_column_definition>
211
212
Defines a computed column expression as a column in a user-defined table type. For more information about tables, see [CREATE TABLE (Transact-SQL)](../../t-sql/statements/create-table-transact-sql.md).
212
213
213
-
<table_constraint>
214
+
\<table_constraint>
214
215
Defines a table constraint on a user-defined table type. Supported constraints include PRIMARY KEY, UNIQUE, and CHECK.
215
216
216
-
<index_option>
217
+
\<index_option>
217
218
Specifies the error response to duplicate key values in a multiple-row insert operation on a unique clustered or unique nonclustered index. For more information about index options, see [CREATE INDEX (Transact-SQL)](../../t-sql/statements/create-index-transact-sql.md).
218
219
219
220
INDEX
220
221
You must specify column and table indexes as part of the CREATE TABLE statement. CREATE INDEX and DROP INDEX are not supported for memory-optimized tables.
221
222
222
223
MEMORY_OPTIMIZED
223
-
||
224
-
|-|
225
-
|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)].|
224
+
**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)].
226
225
227
226
Indicates whether the table type is memory optimized. This option is off by default; the table (type) is not a memory optimized table (type). Memory optimized table types are memory-optimized user tables, the schema of which is persisted on disk similar to other user tables.
228
227
229
228
BUCKET_COUNT
230
-
||
231
-
|-|
232
-
|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)].|
229
+
**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)].
233
230
234
231
Indicates the number of buckets that should be created in the hash index. The maximum value for BUCKET_COUNT in hash indexes is 1,073,741,824. For more information about bucket counts, see [Indexes for Memory-Optimized Tables](../../relational-databases/in-memory-oltp/indexes-for-memory-optimized-tables.md). *bucket_count* is a required argument.
235
232
236
233
HASH
237
-
||
238
-
|-|
239
-
|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)].|
234
+
**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)].
240
235
241
236
Indicates that a HASH index is created. Hash indexes are supported only on memory optimized tables.
242
237
@@ -280,9 +275,7 @@ FROM varchar(11) NOT NULL ;
280
275
### B. Creating a user-defined type
281
276
The following example creates a type `Utf8String` that references class `utf8string` in the assembly `utf8string`. Before creating the type, assembly `utf8string` is registered in the local database. Replace the binary portion of the CREATE ASSEMBLY statement with a valid description.
282
277
283
-
||
284
-
|-|
285
-
|**Applies to**: [!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)].|
278
+
**Applies to**: [!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)].
286
279
287
280
```
288
281
CREATE ASSEMBLY utf8string
@@ -298,7 +291,6 @@ GO
298
291
The following example creates a user-defined table type that has two columns. For more information about how to create and use table-valued parameters, see [Use Table-Valued Parameters (Database Engine)](../../relational-databases/tables/use-table-valued-parameters-database-engine.md).
0 commit comments