Nested creation type in stored procedure T-SQL declaration

I am writing SQL Stored Proc that takes a single table parameter. Is it possible to create a table type in a parameter definition, for example:

CREATE PROCEDURE example (
  @param (CREATE TYPE tableparameter ( column1 int, colunn2 varchar.... )) READONLY
)
+3
source share
1 answer

No.
Databases will want the type to exist before it can be specified as a parameter type, otherwise the database has no way of knowing if the data it receives is valid or not.

+3
source

Source: https://habr.com/ru/post/1752894/


All Articles