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

问题描述

我使用 VS2008 中的内置设计器设计了我的 SQL CE 表.我为一对夫妇选择了错误的名字.我现在完全陷入困境,试图找到一种重命名它们的方法.

I've designed my SQL CE tables using the built-in designer in VS2008. I chose the wrong names for a couple. I am now completely stuck trying to find a way to rename them.

我拒绝相信这样的功能会被遗忘".如何使用 VS2008 设计器或免费的独立应用程序重命名现有表?

I am refusing to believe that such a feature could have been "forgotten". How do I rename an existing table using the VS2008 designer, or a free stand-alone app?

推荐答案

不确定是否通过 VS2008 完成,但您可以使用 sp_rename:更改当前数据库中用户表的名称.目前,SQL Server Compact 3.5 中的 sp_rename 支持仅限于表.

Not sure about doing it via VS2008, but you can use sp_rename: Changes the name of a user table in the current database. Currently, sp_rename support in SQL Server Compact 3.5 is limited to tables.

sp_rename [ @objname = ] 'object_name', 
          [ @newname = ] 'new_name' 
          [ , [ @objtype = ] 'object_type' ]

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

09-18 03:40