Loading... <p><font face="Courier New">Sp_rename 存储过程可以修改当前数据库中用户对象的名称,如表、列、索引、存储过程等待。</font></p><p><font face="Courier New">语法如下:</font></p><p><font face="Courier New"><strong>Sp_rename[@objname=]'object_name',</strong></font></p><p><font face="Courier New"><strong> [@newname=]'new_name'</strong></font></p><p><font face="Courier New"><strong> [,[@objtype=]'object_type']</strong></font></p><p><font face="Courier New">其中[@objtype=]'object_type'是要改名的对象的类型,其值可以为</font></p><p><font face="Courier New" color="#ff0000"><strong>'Column' 列<br /></strong></font><font face="Courier New" color="#ff0000"><strong>'Database' 数据库<br /></strong></font><font face="Courier New" color="#ff0000"><strong>'Index' 索引<br /></strong></font><strong><font face="Courier New" color="#ff0000">'Userdatatype'用户自定义类型<br /></font><font face="Courier New" color="#ff0000">'Object' 对象</font></strong></p><p><font face="Courier New">值'Object'指代了系统表sysobjects中所有对象,如表、视图、</font><font face="Courier New">存储过程、触发器、规则、约束等。'object'值为默认值。</font></p><p><font face="Courier New">例1:更改orders表的列p_id 名称为 products_id</font></p><p><font face="Courier New"><strong>exec sp_rename 'orders.[p_id]','product_id','column'</strong></font></p><p><font face="Courier New">例2: 更改orders表的名称为p_orders</font></p><p><font face="Courier New"><strong>exec sp_rename 'orders','p_orders'</strong></font></p><p><font face="Courier New"></font></p> 相关文章 自建php仿新浪短网址服务 SQL Server 2008 评估期已过的解决办法 Golang 汇编入门知识总结 远程桌面连接报【由于CredSSP 加密数据库修正】错误解决办法 sql判断存储过程是否存在 SQL自定义函数实现特殊功能 C# WebService 调用存储过程 ADOStoredProc的应用 MSSQL分页存储过程 [转]联通勾结SP服务商乱扣费太严重了!!太黑了!! Last modification:August 16th, 2009 at 12:30 pm © 允许规范转载 Support 如果觉得我的文章对你有用,请随意赞赏 ×Close Appreciate the author Sweeping payments Pay by AliPay Pay by WeChat
3ks
`
`for your code按所述操作通过!非常感谢!