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.
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?
Running The Alter Command Click the SQL tab at the top. In the text box, enter the following command: ALTER TABLE exampletable RENAME TO new_table_name; Replace exampletable with your table's name and replace new_table_name with the new name for your table.
If you select the table, you can change the table's name in the Properties pane. If you do not see the Properties pane, simply press F4 and it should automatically appear on the right side of the Studio Manager. The top section of Properties is (Identity) and Name is the first property.
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' ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With