如何重命名表名 [英] how to rename a tablename

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

问题描述

alter table oldtable重命名newtable;







我使用了重命名命令,但它不工作如何我可以不使用storeprocedure重命名表名

alter table oldtable rename newtable;



I used rename command but its not working how i can rename a table name without using storeprocedure

推荐答案

谷歌这是一个非常容易的事情。你问我们要花费你更长时间,而不是问谷歌。为了将来的参考,总是谷歌搜索方法问题,因为答案都在那里。



但是这很容易:

This is an incredibly easy thing to google for. It is taking you longer to ask us than it is to ask google. For future reference, always google for how-to questions because the answers are out there.

However it is this easy:
EXEC sp_rename 'OldTableName', 'NewTableName';





如果您不想使用存储过程,请右键单击SSMS中的表并重命名。



And if you do not want to use the Stored Procedure, then right-click on the table in SSMS and rename it.


这篇关于如何重命名表名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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