如何在SQL Server Compact Edition中重命名表 [英] How to rename a table in the sql server compact edition

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

问题描述

我是SQL Server Compact版本的新手.我正在使用Compact Edition 3.5.我试图重命名表.但是,我无法通过以下查询来做到这一点.

I'm new to SQL Server Compact edition. I'm using Compact edition 3.5. I tried renaming the table. But, I couldn't do that through the following query.

将表的表名更改为新名称

alter table tablename to newname

Plz,有人帮我.........

Plz, someone help me.........

推荐答案

尝试一下

sp_rename '[OldTableName]' , '[NewTableName]'

查看下面的链接以获取更多信息

Check links below for more information

http://erikej.blogspot.com/2007/08/hidden-gem-rename-table.html

祝你好运!

更新

在这里您可以找到类似的问题

Here you can find a similar question

如何在SQL Server Compact Edition?

您可以尝试使用此工具

http://www.primeworks-mobile.com/

或在Visual Studio中尝试

or try this in visual studio

conn.Open();
SqlCeCommand cmd = new SqlCeCommand("sp_rename 'oldTable', 'newTable' ", conn);
cmd.ExecuteNonQuery();
conn.Close();

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

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