开发者

Nested Create Type in Stored Procedure Declaration T-SQL

开发者 https://www.devze.com 2023-01-06 08:17 出处:网络
I am writing a SQL Stored Proc which takes in a single table valued parameter. Is it possible for me to create the table type in the parameter definition, for example:

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

CREATE PROCEDUR开发者_如何转开发E example (
  @param (CREATE TYPE tableparameter ( column1 int, colunn2 varchar.... )) READONLY
)


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号