如何更改用户定义的表类型 [英] How to alter User Defined Table Types

查看:155
本文介绍了如何更改用户定义的表类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何按顺序更改用户定义的表类型和表值参数??



任何人都可以使用相同的语法。?





How alter User Defined Table Types and Table-Valued Parameters in sequence.?

Can any one have syntax for the same.?


CREATE TYPE [dbo].[imptbls] AS TABLE(
    [varSrNo] [int] NOT NULL,
    [varStatus] [varchar](100) NULL,
    [varUserID] [varchar](50) NULL,
   [varRole] [varchar](25) NULL,
    PRIMARY KEY CLUSTERED
(
    [varSrNo] ASC
)WITH (IGNORE_DUP_KEY = OFF)
)
GO





我想交换两个参数所以这就是为什么我想改变表。



I want to swap both parameter so thts's Why i want to alter the table.

推荐答案



用户 - 定义的表类型定义在创建后无法修改。


The user-defined table type definition cannot be modified after it is created.



您将需要删除任何依赖于类型的过程或函数;放弃类型;使用新定义创建类型;最后重新创建依赖的过程/函数。


You will need to drop any procedures or functions which depend on the type; drop the type; create the type with the new definition; and finally re-create the dependant procedures / functions.


这篇关于如何更改用户定义的表类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆